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 import 'package:scheduled_test/descriptor.dart' as d; | 5 import 'package:scheduled_test/descriptor.dart' as d; |
6 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
7 | 7 |
8 import '../metatest.dart'; | 8 import 'package:metatest/metatest.dart'; |
9 import 'utils.dart'; | 9 import 'utils.dart'; |
10 | 10 |
11 void main(_, message) { | 11 void main() => initTests(_test); |
| 12 |
| 13 void _test(message) { |
12 initMetatest(message); | 14 initMetatest(message); |
13 | 15 |
14 setUpTimeout(); | 16 setUpTimeout(); |
15 | 17 |
16 expectTestsPass("async().create() forwards to file().create", () { | 18 expectTestsPass("async().create() forwards to file().create", () { |
17 test('test', () { | 19 test('test', () { |
18 scheduleSandbox(); | 20 scheduleSandbox(); |
19 | 21 |
20 d.async(pumpEventQueue().then((_) { | 22 d.async(pumpEventQueue().then((_) { |
21 return d.file('name.txt', 'contents'); | 23 return d.file('name.txt', 'contents'); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 })).validate(); | 113 })).validate(); |
112 }); | 114 }); |
113 | 115 |
114 test('test 2', () { | 116 test('test 2', () { |
115 expect(errors.single, new isInstanceOf<ScheduleError>()); | 117 expect(errors.single, new isInstanceOf<ScheduleError>()); |
116 expect(errors.single.error.toString(), | 118 expect(errors.single.error.toString(), |
117 matches(r"^Directory not found: '[^']+[\\/]dir'\.$")); | 119 matches(r"^Directory not found: '[^']+[\\/]dir'\.$")); |
118 }); | 120 }); |
119 }, passing: ['test 2']); | 121 }, passing: ['test 2']); |
120 } | 122 } |
OLD | NEW |