Index: pkg/unittest/test/unittest_test.dart |
diff --git a/pkg/unittest/test/unittest_test.dart b/pkg/unittest/test/unittest_test.dart |
index 8a641a4a03fe50424c33a4a89eae44bf71c68f2f..f6a2f5dab31df02b917a100f4321ff80205d3d7d 100644 |
--- a/pkg/unittest/test/unittest_test.dart |
+++ b/pkg/unittest/test/unittest_test.dart |
@@ -15,7 +15,7 @@ import 'dart:async'; |
import 'package:unittest/unittest.dart'; |
Future _defer(void fn()) { |
- return new Future.of(fn); |
+ return new Future.sync(fn); |
} |
String buildStatusString(int passed, int failed, int errors, |
@@ -154,37 +154,37 @@ runTest() { |
} else if (testName == 'async setup/teardown test') { |
group('good setup/good teardown', () { |
setUp(() { |
- return new Future.immediate(0); |
+ return new Future.value(0); |
}); |
tearDown(() { |
- return new Future.immediate(0); |
+ return new Future.value(0); |
}); |
test('foo1', (){}); |
}); |
group('good setup/bad teardown', () { |
setUp(() { |
- return new Future.immediate(0); |
+ return new Future.value(0); |
}); |
tearDown(() { |
- return new Future.immediateError("Failed to complete tearDown"); |
+ return new Future.error("Failed to complete tearDown"); |
}); |
test('foo2', (){}); |
}); |
group('bad setup/good teardown', () { |
setUp(() { |
- return new Future.immediateError("Failed to complete setUp"); |
+ return new Future.error("Failed to complete setUp"); |
}); |
tearDown(() { |
- return new Future.immediate(0); |
+ return new Future.value(0); |
}); |
test('foo3', (){}); |
}); |
group('bad setup/bad teardown', () { |
setUp(() { |
- return new Future.immediateError("Failed to complete setUp"); |
+ return new Future.error("Failed to complete setUp"); |
}); |
tearDown(() { |
- return new Future.immediateError("Failed to complete tearDown"); |
+ return new Future.error("Failed to complete tearDown"); |
}); |
test('foo4', (){}); |
}); |