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 unittestTest; | 5 library unittestTest; |
| 6 |
| 7 import 'dart:async'; |
6 import 'dart:isolate'; | 8 import 'dart:isolate'; |
7 import 'dart:async'; | 9 |
8 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
9 | 11 |
10 part 'unittest_test_utils.dart'; | 12 part 'utils.dart'; |
11 | 13 |
12 var testFunction = (TestConfiguration testConfig) { | 14 var testFunction = (TestConfiguration testConfig) { |
13 test('expectAsync zero params', () { | 15 test('expectAsync zero params', () { |
14 _defer(expectAsync(() { | 16 _defer(expectAsync(() { |
15 ++testConfig.count; | 17 ++testConfig.count; |
16 })); | 18 })); |
17 }); | 19 }); |
18 | 20 |
19 test('expectAsync 1 param', () { | 21 test('expectAsync 1 param', () { |
20 var func = expectAsync((arg) { | 22 var func = expectAsync((arg) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 _defer(() => func(false, null)); | 88 _defer(() => func(false, null)); |
87 }); | 89 }); |
88 }; | 90 }; |
89 | 91 |
90 final expected = '8:0:0:8:8:::null:expectAsync zero params:' | 92 final expected = '8:0:0:8:8:::null:expectAsync zero params:' |
91 ':expectAsync 1 param::expectAsync 2 param:' | 93 ':expectAsync 1 param::expectAsync 2 param:' |
92 ':single arg to Future.catchError::2 args to Future.catchError:' | 94 ':single arg to Future.catchError::2 args to Future.catchError:' |
93 ':zero of two optional positional args:' | 95 ':zero of two optional positional args:' |
94 ':one of two optional positional args:' | 96 ':one of two optional positional args:' |
95 ':two of two optional positional args:'; | 97 ':two of two optional positional args:'; |
OLD | NEW |