mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 06:16:48 +00:00
Fix the Futures tests for dart2js.
TBR Review URL: https://codereview.chromium.org//11411242 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15474 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
7263b0f65e
commit
9688c983de
|
@ -28,7 +28,9 @@ Future testCompleteBeforeWait() {
|
|||
}
|
||||
|
||||
Future testForEachEmpty() {
|
||||
return Futures.forEach([], (_) => throw 'should not be called');
|
||||
return Futures.forEach([], (_) {
|
||||
throw 'should not be called';
|
||||
});
|
||||
}
|
||||
|
||||
Future testForEach() {
|
||||
|
@ -45,7 +47,9 @@ Future testForEachWithException() {
|
|||
if (n == 4) throw 'correct exception';
|
||||
seen.add(n);
|
||||
return new Future.immediate(null);
|
||||
}).transform((_) => throw 'incorrect exception').transformException((e) {
|
||||
}).transform((_) {
|
||||
throw 'incorrect exception';
|
||||
}).transformException((e) {
|
||||
Expect.equals('correct exception', e);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue