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

Side by Side Diff: tests/standalone/io/skipping_dart2js_compilations_test.dart

Issue 50413005: Reapply "Remove @deprecated features." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head 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
« no previous file with comments | « tests/standalone/io/regress_7679_test.dart ('k') | utils/compiler/create_snapshot.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* 5 /*
6 * This test makes sure that the "skipping Dart2Js compilations if the output is 6 * This test makes sure that the "skipping Dart2Js compilations if the output is
7 * already up to date" feature does work as it should. 7 * already up to date" feature does work as it should.
8 * Therefore this test ensures that compilations are only skipped if the last 8 * Therefore this test ensures that compilations are only skipped if the last
9 * modified date of the output of a dart2js compilation is newer than 9 * modified date of the output of a dart2js compilation is newer than
10 * - the the dart application to compile (including it's dependencies) 10 * - the the dart application to compile (including it's dependencies)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return suite.TestUtils.absolutePath(new Path(tempDir.path) 100 return suite.TestUtils.absolutePath(new Path(tempDir.path)
101 .append('test_dart2js.snapshot')); 101 .append('test_dart2js.snapshot'));
102 } 102 }
103 103
104 void touchFile(File file) { 104 void touchFile(File file) {
105 _writeToFile(file, _readFile(file)); 105 _writeToFile(file, _readFile(file));
106 } 106 }
107 107
108 void _writeToFile(File file, String content) { 108 void _writeToFile(File file, String content) {
109 if (content != null) { 109 if (content != null) {
110 var fd = new File(file.fullPathSync()).openSync(mode: FileMode.WRITE); 110 var fd = new File(file.resolveSymbolicLinksSync())
111 .openSync(mode: FileMode.WRITE);
111 fd.writeStringSync(content); 112 fd.writeStringSync(content);
112 fd.closeSync(); 113 fd.closeSync();
113 } 114 }
114 } 115 }
115 116
116 String _readFile(File file) { 117 String _readFile(File file) {
117 return file.readAsStringSync(); 118 return file.readAsStringSync();
118 } 119 }
119 120
120 File _createFile(Path path) { 121 File _createFile(Path path) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 cleanup(); 237 cleanup();
237 throw error; 238 throw error;
238 }).then((_) { 239 }).then((_) {
239 cleanup(); 240 cleanup();
240 }); 241 });
241 } 242 }
242 // We need to wait some time to make sure that the files we 'touch' get a 243 // We need to wait some time to make sure that the files we 'touch' get a
243 // bigger timestamp than the old ones 244 // bigger timestamp than the old ones
244 new Timer(new Duration(seconds: 1), touchFilesAndRunTests); 245 new Timer(new Duration(seconds: 1), touchFilesAndRunTests);
245 } 246 }
OLDNEW
« no previous file with comments | « tests/standalone/io/regress_7679_test.dart ('k') | utils/compiler/create_snapshot.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698