Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Unified Diff: test/utils.dart

Issue 2161283002: Fix Dart 1.17 strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/typed_wrapper/stream_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/utils.dart
diff --git a/test/utils.dart b/test/utils.dart
index 7b65bcb70e09fc2df0b14b163f54eeff39d84ac3..50e106bd57a8acf6bba5f38d9e0b9a37a4270f01 100644
--- a/test/utils.dart
+++ b/test/utils.dart
@@ -11,10 +11,13 @@ import "package:test/test.dart";
/// A zero-millisecond timer should wait until after all microtasks.
Future flushMicrotasks() => new Future.delayed(Duration.ZERO);
+typedef void OptionalArgAction([a, b]);
+
/// A generic unreachable callback function.
///
/// Returns a function that fails the test if it is ever called.
-unreachable(String name) => ([a, b]) => fail("Unreachable: $name");
+OptionalArgAction unreachable(String name) =>
+ ([a, b]) => fail("Unreachable: $name");
// TODO(nweiz): Use the version of this in test when test#418 is fixed.
/// A matcher that runs a callback in its own zone and asserts that that zone
« no previous file with comments | « test/typed_wrapper/stream_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698