| 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 'package:metatest/metatest.dart'; |
| 12 import 'utils.dart'; | 12 import 'utils.dart'; |
| 13 | 13 |
| 14 void main(_, message) { | 14 void main() => initTests(_test); |
| 15 |
| 16 void _test(message) { |
| 15 initMetatest(message); | 17 initMetatest(message); |
| 16 | 18 |
| 17 setUpTimeout(); | 19 setUpTimeout(); |
| 18 | 20 |
| 19 expectTestsPass("nothing().create() does nothing", () { | 21 expectTestsPass("nothing().create() does nothing", () { |
| 20 test('test', () { | 22 test('test', () { |
| 21 scheduleSandbox(); | 23 scheduleSandbox(); |
| 22 | 24 |
| 23 d.nothing('foo').create(); | 25 d.nothing('foo').create(); |
| 24 | 26 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 new Link(path.join(sandbox, 'link')).createSync('nonexistent'); | 72 new Link(path.join(sandbox, 'link')).createSync('nonexistent'); |
| 71 }); | 73 }); |
| 72 d.nothing('link').validate(); | 74 d.nothing('link').validate(); |
| 73 }, (errors) { | 75 }, (errors) { |
| 74 expect(errors.single, new isInstanceOf<ScheduleError>()); | 76 expect(errors.single, new isInstanceOf<ScheduleError>()); |
| 75 expect(errors.single.error.toString(), | 77 expect(errors.single.error.toString(), |
| 76 matches(r"^Expected nothing to exist at '[^']+[\\/]link', but found " | 78 matches(r"^Expected nothing to exist at '[^']+[\\/]link', but found " |
| 77 r"a link\.$")); | 79 r"a link\.$")); |
| 78 }); | 80 }); |
| 79 } | 81 } |
| OLD | NEW |