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

Side by Side Diff: tests/compiler/dart2js/dart2js_batch2_test.dart

Issue 1024463007: Make unittests work on Windows (again) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 import 'package:async_helper/async_helper.dart'; 10 import 'package:async_helper/async_helper.dart';
(...skipping 21 matching lines...) Expand all
32 .then((Directory dir) { 32 .then((Directory dir) {
33 return dir; 33 return dir;
34 }); 34 });
35 } 35 }
36 36
37 Future setup() { 37 Future setup() {
38 return createTempDir().then((Directory directory) { 38 return createTempDir().then((Directory directory) {
39 tmpDir = directory; 39 tmpDir = directory;
40 String newPath = path.join(directory.path, "dart2js_batch2_run.dart"); 40 String newPath = path.join(directory.path, "dart2js_batch2_run.dart");
41 File source = 41 File source =
42 new File(Platform.script.resolve("dart2js_batch2_run.dart").path); 42 new File.fromUri(Platform.script.resolve("dart2js_batch2_run.dart"));
43 source.copySync(newPath); 43 source.copySync(newPath);
44 }); 44 });
45 } 45 }
46 46
47 void cleanUp() { 47 void cleanUp() {
48 print("Deleting '${tmpDir.path}'."); 48 print("Deleting '${tmpDir.path}'.");
49 tmpDir.deleteSync(recursive: true); 49 tmpDir.deleteSync(recursive: true);
50 } 50 }
51 51
52 Future launchDart2Js(_) { 52 Future launchDart2Js(_) {
(...skipping 24 matching lines...) Expand all
77 77
78 void main() { 78 void main() {
79 var tmpDir; 79 var tmpDir;
80 asyncTest(() { 80 asyncTest(() {
81 return setup() 81 return setup()
82 .then(launchDart2Js) 82 .then(launchDart2Js)
83 .then(runTests) 83 .then(runTests)
84 .whenComplete(cleanUp); 84 .whenComplete(cleanUp);
85 }); 85 });
86 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698