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 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:scheduled_test/descriptor.dart' as d; | 7 import 'package:scheduled_test/descriptor.dart' as d; |
8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
9 | 9 |
10 import '../metatest.dart'; | 10 import '../metatest.dart'; |
11 import 'utils.dart'; | 11 import 'utils.dart'; |
12 | 12 |
13 void main() { | 13 void main(List<String> args, message) { |
| 14 metaTestInit(message); |
| 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'); |
22 })).create(); | 24 })).create(); |
23 | 25 |
(...skipping 87 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 |