OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library unittest.returning_future_using_runasync_test; | 5 library unittest.returning_future_using_runasync_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:metatest/metatest.dart'; | 9 import 'package:metatest/metatest.dart'; |
10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 var excesscallback = expectAsync(() {}); | 56 var excesscallback = expectAsync(() {}); |
57 return new Future.sync(() { | 57 return new Future.sync(() { |
58 scheduleMicrotask(() { | 58 scheduleMicrotask(() { |
59 excesscallback(); | 59 excesscallback(); |
60 excesscallback(); | 60 excesscallback(); |
61 excesscallback(); | 61 excesscallback(); |
62 callback(); | 62 callback(); |
63 }); | 63 }); |
64 }); | 64 }); |
65 }); | 65 }); |
66 test('foo6', () { | 66 test('foo6', () {}); |
67 }); | 67 }, [ |
68 }, [{ | 68 {'description': 'successful', 'result': 'pass',}, |
69 'description': 'successful', | 69 { |
70 'result': 'pass', | 70 'description': 'fail1', |
71 }, { | 71 'message': 'Expected: <false>\n' ' Actual: <true>\n' '', |
72 'description': 'fail1', | 72 'result': 'fail', |
73 'message': 'Expected: <false>\n' ' Actual: <true>\n' '', | 73 }, |
74 'result': 'fail', | 74 { |
75 }, { | 75 'description': 'error1', |
76 'description': 'error1', | 76 'message': 'Callback called more times than expected (1).', |
77 'message': 'Callback called more times than expected (1).', | 77 'result': 'fail', |
78 'result': 'fail', | 78 }, |
79 }, { | 79 {'description': 'fail2', 'message': 'failure', 'result': 'fail',}, |
80 'description': 'fail2', | 80 { |
81 'message': 'failure', | 81 'description': 'error2', |
82 'result': 'fail', | 82 'message': 'Callback called more times than expected (1).', |
83 }, { | 83 'result': 'fail', |
84 'description': 'error2', | 84 }, |
85 'message': 'Callback called more times than expected (1).', | 85 {'description': 'foo6', 'result': 'pass',} |
86 'result': 'fail', | 86 ]); |
87 }, { | |
88 'description': 'foo6', | |
89 'result': 'pass', | |
90 }]); | |
91 } | 87 } |
OLD | NEW |