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:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:path/path.dart' as path; | 7 import 'package:path/path.dart' as path; |
8 import 'package:scheduled_test/descriptor.dart' as d; | 8 import 'package:scheduled_test/descriptor.dart' as d; |
9 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
10 | 10 |
11 import '../metatest.dart'; | 11 import '../metatest.dart'; |
12 import 'utils.dart'; | 12 import 'utils.dart'; |
13 | 13 |
14 void main() { | 14 void main(List<String> args, message) { |
| 15 metaTestInit(message); |
| 16 |
15 setUpTimeout(); | 17 setUpTimeout(); |
16 | 18 |
17 expectTestsPass('file().create() creates a file', () { | 19 expectTestsPass('file().create() creates a file', () { |
18 test('test', () { | 20 test('test', () { |
19 scheduleSandbox(); | 21 scheduleSandbox(); |
20 | 22 |
21 d.file('name.txt', 'contents').create(); | 23 d.file('name.txt', 'contents').create(); |
22 | 24 |
23 schedule(() { | 25 schedule(() { |
24 expect(new File(path.join(sandbox, 'name.txt')).readAsString(), | 26 expect(new File(path.join(sandbox, 'name.txt')).readAsString(), |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 }); | 257 }); |
256 | 258 |
257 test('test 2', () { | 259 test('test 2', () { |
258 expect(errors.single, new isInstanceOf<ScheduleError>()); | 260 expect(errors.single, new isInstanceOf<ScheduleError>()); |
259 expect(errors.single.error.toString(), equals( | 261 expect(errors.single.error.toString(), equals( |
260 "Expected: contains <12>\n" | 262 "Expected: contains <12>\n" |
261 " Actual: [98, 97, 114, 102, 111, 111, 98, 97, 122]\n")); | 263 " Actual: [98, 97, 114, 102, 111, 111, 98, 97, 122]\n")); |
262 }); | 264 }); |
263 }, passing: ['test 2']); | 265 }, passing: ['test 2']); |
264 } | 266 } |
OLD | NEW |