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

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

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 1 month 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 '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
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 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/test/descriptor/directory_test.dart ('k') | pkg/scheduled_test/test/descriptor/nothing_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698