Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1510)

Side by Side Diff: pkg/scheduled_test/test/descriptor/pattern_test.dart

Issue 524153002: Sharing metatest logic between unittest and scheduled_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: status fixes Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 String sandbox; 11 String sandbox;
12 12
13 void main(_, message) { 13 void main() => initTests(_test);
14
15 void _test(message) {
14 initMetatest(message); 16 initMetatest(message);
15 17
16 setUpTimeout(); 18 setUpTimeout();
17 19
18 expectTestsPass("pattern().validate() succeeds if there's a file matching " 20 expectTestsPass("pattern().validate() succeeds if there's a file matching "
19 "the pattern and the child entry", () { 21 "the pattern and the child entry", () {
20 test('test', () { 22 test('test', () {
21 scheduleSandbox(); 23 scheduleSandbox();
22 24
23 d.file('foo', 'blap').create(); 25 d.file('foo', 'blap').create();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 expect(errors.single, new isInstanceOf<ScheduleError>()); 156 expect(errors.single, new isInstanceOf<ScheduleError>());
155 expect(errors.single.error.toString(), matches( 157 expect(errors.single.error.toString(), matches(
156 r"^Multiple valid entries found in '[^']+' matching " 158 r"^Multiple valid entries found in '[^']+' matching "
157 r"\/f\.\./:\n" 159 r"\/f\.\./:\n"
158 r"\* faa\n" 160 r"\* faa\n"
159 r"\* fee\n" 161 r"\* fee\n"
160 r"\* foo$")); 162 r"\* foo$"));
161 }); 163 });
162 }, passing: ['test 2']); 164 }, passing: ['test 2']);
163 } 165 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/test/descriptor/nothing_test.dart ('k') | pkg/scheduled_test/test/metatest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698