Chromium Code Reviews

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

Issue 193643003: pkg/unittest: support up to 6 arguments in expectAsync[Until] (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: doc comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: pkg/unittest/test/unittest_test_returning_future_using_runasync_test.dart
diff --git a/pkg/unittest/test/unittest_test_returning_future_using_runasync_test.dart b/pkg/unittest/test/unittest_test_returning_future_using_runasync_test.dart
index 98f276b825f04a9d3b8d856f1266f0ea612247b4..e5fc304d7168b80a52c06d0f9512f35a1f5d14f2 100644
--- a/pkg/unittest/test/unittest_test_returning_future_using_runasync_test.dart
+++ b/pkg/unittest/test/unittest_test_returning_future_using_runasync_test.dart
@@ -15,58 +15,48 @@ var testFunction = (_) {
test("successful", () {
return _defer(() {
scheduleMicrotask(() {
- guardAsync(() {
- expect(true, true);
- });
+ expect(true, true);
});
});
});
test("fail1", () {
- var callback = expectAsync0((){});
+ var callback = expectAsync(() {});
return _defer(() {
scheduleMicrotask(() {
- guardAsync(() {
- expect(true, false);
- callback();
- });
+ expect(true, false);
+ callback();
});
});
});
test('error1', () {
- var callback = expectAsync0((){});
- var excesscallback = expectAsync0((){});
+ var callback = expectAsync(() {});
+ var excesscallback = expectAsync(() {});
return _defer(() {
scheduleMicrotask(() {
- guardAsync(() {
- excesscallback();
- excesscallback();
- callback();
- });
+ excesscallback();
+ excesscallback();
+ callback();
});
});
});
test("fail2", () {
- var callback = expectAsync0((){});
+ var callback = expectAsync(() {});
return _defer(() {
scheduleMicrotask(() {
- guardAsync(() {
- fail('failure');
- callback();
- });
+ fail('failure');
+ callback();
});
});
});
test('error2', () {
- var callback = expectAsync0((){});
- var excesscallback = expectAsync0((){});
+ var callback = expectAsync(() {});
+ var excesscallback = expectAsync(() {});
return _defer(() {
scheduleMicrotask(() {
- guardAsync(() {
- excesscallback();
- excesscallback();
- excesscallback();
- callback();
- });
+ excesscallback();
+ excesscallback();
+ excesscallback();
+ callback();
});
});
});
« no previous file with comments | « pkg/unittest/test/unittest_test_returning_future_test.dart ('k') | pkg/unittest/test/unittest_test_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine