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

Unified Diff: tests/lib/async/zone_error_callback_test.dart

Issue 2893893002: Use generic functions in zones. (Closed)
Patch Set: Fix more tests. Created 3 years, 4 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 | « tests/lib/async/zone_debug_test.dart ('k') | tests/lib/async/zone_fork_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/zone_error_callback_test.dart
diff --git a/tests/lib/async/zone_error_callback_test.dart b/tests/lib/async/zone_error_callback_test.dart
index da6773a4c09136a692a73f400c17ead67de8dd8a..5ad373e6fa875fd43a3c24d2aa8a93d3141aff34 100644
--- a/tests/lib/async/zone_error_callback_test.dart
+++ b/tests/lib/async/zone_error_callback_test.dart
@@ -32,17 +32,19 @@ class SomeError implements Error {
const error1 = const SomeError(1);
const error2 = const SomeError(2);
-void expectError(e, s) {
+Null expectError(e, s) {
// Remember one asyncStart per use of this callback.
Expect.identical(error1, e);
Expect.identical(stack1, s);
asyncEnd();
+ return null;
}
-void expectErrorOnly(e, s) {
+Null expectErrorOnly(e, s) {
// Remember one asyncStart per use of this callback.
Expect.identical(error1, e);
asyncEnd();
+ return null;
}
AsyncError replace(self, parent, zone, e, s) {
@@ -54,10 +56,11 @@ AsyncError replace(self, parent, zone, e, s) {
var replaceZoneSpec = new ZoneSpecification(errorCallback: replace);
// Expectation after replacing.
-void expectReplaced(e, s) {
+Null expectReplaced(e, s) {
Expect.identical(error2, e);
Expect.identical(stack2, s);
asyncEnd();
+ return null;
}
void testProgrammaticErrors(expectError) {
« no previous file with comments | « tests/lib/async/zone_debug_test.dart ('k') | tests/lib/async/zone_fork_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698