Index: pkg/unittest/test/test_utils.dart |
diff --git a/pkg/unittest/test/test_utils.dart b/pkg/unittest/test/test_utils.dart |
index 4a7e1ae13e5746c983084741028da7620c296cb6..17e88486fcaece76ca82795fe8e8dc73a82447d9 100644 |
--- a/pkg/unittest/test/test_utils.dart |
+++ b/pkg/unittest/test/test_utils.dart |
@@ -26,7 +26,7 @@ void shouldFail(value, Matcher matcher, expected, {bool isAsync: false}) { |
errorCount = 0; |
errorString = ''; |
expect(value, matcher); |
- afterTest(_) { |
+ afterTest() { |
configureExpectFailureHandler(null); |
expect(errorCount, equals(1)); |
if (expected is String) { |
@@ -37,9 +37,9 @@ void shouldFail(value, Matcher matcher, expected, {bool isAsync: false}) { |
} |
if (isAsync) { |
- new Timer(0, expectAsync1(afterTest)); |
+ Timer.run(expectAsync0(afterTest)); |
} else { |
- afterTest(null); |
+ afterTest(); |
} |
} |
@@ -48,13 +48,13 @@ void shouldPass(value, Matcher matcher, {bool isAsync: false}) { |
errorCount = 0; |
errorString = ''; |
expect(value, matcher); |
- afterTest(_) { |
+ afterTest() { |
configureExpectFailureHandler(null); |
expect(errorCount, equals(0)); |
} |
if (isAsync) { |
- new Timer(0, expectAsync1(afterTest)); |
+ Timer.run(expectAsync0(afterTest)); |
} else { |
- afterTest(null); |
+ afterTest(); |
} |
} |