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

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

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 years, 11 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 File _createFile(Path path) { 117 File _createFile(Path path) {
118 var file = new File(path.toNativePath()); 118 var file = new File(path.toNativePath());
119 file.createSync(); 119 file.createSync();
120 return file; 120 return file;
121 } 121 }
122 } 122 }
123 123
124 class TestCompletedHandler { 124 class TestCompletedHandler {
125 FileUtils fileUtils; 125 FileUtils fileUtils;
126 Date _expectedTimestamp; 126 DateTime _expectedTimestamp;
127 bool _shouldHaveRun; 127 bool _shouldHaveRun;
128 128
129 TestCompletedHandler(FileUtils this.fileUtils, bool this._shouldHaveRun); 129 TestCompletedHandler(FileUtils this.fileUtils, bool this._shouldHaveRun);
130 130
131 void processCompletedTest(runner.TestCase testCase) { 131 void processCompletedTest(runner.TestCase testCase) {
132 var output = testCase.lastCommandOutput; 132 var output = testCase.lastCommandOutput;
133 133
134 Expect.isFalse(output.unexpectedOutput); 134 Expect.isFalse(output.unexpectedOutput);
135 Expect.isTrue(output.stderr.length == 0); 135 Expect.isTrue(output.stderr.length == 0);
136 if (_shouldHaveRun) { 136 if (_shouldHaveRun) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 runTest("fs_notUpToDate_snapshot", fs_notUpToDate_snapshot, true); 216 runTest("fs_notUpToDate_snapshot", fs_notUpToDate_snapshot, true);
217 runTest("fs_notUpToDate_dart", fs_notUpToDate_dart, true); 217 runTest("fs_notUpToDate_dart", fs_notUpToDate_dart, true);
218 // This is the only test where all dependencies are present and the test.js 218 // This is the only test where all dependencies are present and the test.js
219 // file is newer than all the others. So we pass 'false' for shouldRun. 219 // file is newer than all the others. So we pass 'false' for shouldRun.
220 runTest("fs_upToDate", fs_upToDate, false); 220 runTest("fs_upToDate", fs_upToDate, false);
221 } 221 }
222 // We need to wait some time to make sure that the files we 'touch' get a 222 // We need to wait some time to make sure that the files we 'touch' get a
223 // bigger timestamp than the old ones 223 // bigger timestamp than the old ones
224 new Timer(1000, touchFilesAndRunTests); 224 new Timer(1000, touchFilesAndRunTests);
225 } 225 }
OLDNEW
« no previous file with comments | « tests/standalone/io/secure_socket_bad_certificate_test.dart ('k') | tests/standalone/io/test_runner_exit_code_script.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698