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

Unified Diff: tests/corelib/future_test.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/corelib/date_time_test.dart ('k') | tests/corelib/list_insert_range_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/future_test.dart
===================================================================
--- tests/corelib/future_test.dart (revision 13683)
+++ tests/corelib/future_test.dart (working copy)
@@ -74,7 +74,7 @@
completer.completeException(exception);
Expect.equals(exception, future.exception);
Expect.equals(exception, err);
- Expect.throws(() => future.value, check: (e) => e == exception);
+ Expect.throws(() => future.value, (e) => e == exception);
}
testCompleteWithCompleteHandlerAfterComplete() {
@@ -108,7 +108,7 @@
});
Expect.equals(exception, future.exception);
Expect.equals(exception, err);
- Expect.throws(() => future.value, check: (e) => e == exception);
+ Expect.throws(() => future.value, (e) => e == exception);
}
testCompleteWithManyCompleteHandlers() {
@@ -146,7 +146,7 @@
Expect.equals(exception, before);
Expect.equals(exception, after1);
Expect.equals(exception, after2);
- Expect.throws(() => future.value, check: (e) => e == exception);
+ Expect.throws(() => future.value, (e) => e == exception);
}
// Tests for [then]
@@ -207,7 +207,7 @@
future.then((_) {}); // exception is thrown if we plan to use the value
Expect.throws(
() { completer.completeException(ex); },
- check: (e) => e == ex);
+ (e) => e == ex);
}
testExceptionNoSuccessListeners() {
@@ -263,7 +263,7 @@
future.handleException((e) { reached = true; return false; }); // overshadowed
Expect.throws(
() { completer.completeException(ex); },
- check: (e) => e == ex);
+ (e) => e == ex);
Expect.isTrue(reached);
}
@@ -385,7 +385,7 @@
exceptionFromCompleteHandler = f.exception;
});
future.then((v) => Expect.fail("Should not succeed"));
- Expect.throws(() => completer.completeException(ex), check: (e) => ex == e);
+ Expect.throws(() => completer.completeException(ex), (e) => ex == e);
Expect.equals(ex, exceptionFromCompleteHandler);
}
@@ -438,7 +438,7 @@
final transformedFuture = completer.future.transform((x) { throw error; });
Expect.isFalse(transformedFuture.isComplete);
transformedFuture.then((v) => null);
- Expect.throws(() => completer.complete("42"), check: (e) => e == error);
+ Expect.throws(() => completer.complete("42"), (e) => e == error);
Expect.equals(error, transformedFuture.exception);
}
@@ -478,7 +478,7 @@
});
chainedFuture.then((v) => null);
Expect.isFalse(chainedFuture.isComplete);
- Expect.throws(() => completerA.complete("42"), check: (e) => e == error);
+ Expect.throws(() => completerA.complete("42"), (e) => e == error);
Expect.equals(error, chainedFuture.exception);
}
« no previous file with comments | « tests/corelib/date_time_test.dart ('k') | tests/corelib/list_insert_range_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698