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

Unified Diff: pkg/unittest/test/unittest_test.dart

Issue 14886015: Use runAsync for Futures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment Created 7 years, 7 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 | « pkg/scheduled_test/lib/src/utils.dart ('k') | sdk/lib/async/future_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/unittest_test.dart
diff --git a/pkg/unittest/test/unittest_test.dart b/pkg/unittest/test/unittest_test.dart
index f1d1aad79cc55d4bf1e40d7b7a1b9d8c48bff063..1bbfb183d0fb2c8b21c65f13b630eb77267bb2f0 100644
--- a/pkg/unittest/test/unittest_test.dart
+++ b/pkg/unittest/test/unittest_test.dart
@@ -251,10 +251,10 @@ runTest() {
});
test('foo5', () {
});
- } else if (testName == 'test returning future using Timer') {
+ } else if (testName == 'test returning future using runAsync') {
test("successful", () {
return _defer(() {
- Timer.run(() {
+ runAsync(() {
guardAsync(() {
expect(true, true);
});
@@ -264,7 +264,7 @@ runTest() {
test("fail1", () {
var callback = expectAsync0((){});
return _defer(() {
- Timer.run(() {
+ runAsync(() {
guardAsync(() {
expect(true, false);
callback();
@@ -276,7 +276,7 @@ runTest() {
var callback = expectAsync0((){});
var excesscallback = expectAsync0((){});
return _defer(() {
- Timer.run(() {
+ runAsync(() {
guardAsync(() {
excesscallback();
excesscallback();
@@ -288,7 +288,7 @@ runTest() {
test("fail2", () {
var callback = expectAsync0((){});
return _defer(() {
- Timer.run(() {
+ runAsync(() {
guardAsync(() {
fail('failure');
callback();
@@ -300,7 +300,7 @@ runTest() {
var callback = expectAsync0((){});
var excesscallback = expectAsync0((){});
return _defer(() {
- Timer.run(() {
+ runAsync(() {
guardAsync(() {
excesscallback();
excesscallback();
@@ -444,7 +444,7 @@ main() {
'error2:Callback called more times than expected (1).:'
'fail2:failure:'
'foo5'),
- 'test returning future using Timer': buildStatusString(2, 4, 0,
+ 'test returning future using runAsync': buildStatusString(2, 4, 0,
'successful::'
'fail1:Expected: <false> but: was <true>.:'
'error1:Callback called more times than expected (1).:'
« no previous file with comments | « pkg/scheduled_test/lib/src/utils.dart ('k') | sdk/lib/async/future_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698