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:
nweiz@google.com 2012-11-28 22:00:55 +00:00
parent 7263b0f65e
commit 9688c983de

View file

@ -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);
});
}