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

Side by Side Diff: pkg/scheduled_test/test/descriptor/async_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: CR feedback 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';
nweiz 2014/09/10 21:04:42 Move "package:" imports with other "package:" impo
kevmoo 2014/09/17 21:16:29 Done.
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698