| OLD | NEW |
| 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 #import("dart:io"); | 5 #import("dart:io"); |
| 6 #import("dart:isolate"); | 6 #import("dart:isolate"); |
| 7 #import("dart:uri"); | 7 #import("dart:uri"); |
| 8 #import("../../../tools/testing/dart/test_suite.dart"); | 8 #import("../../../tools/testing/dart/test_suite.dart"); |
| 9 #import("../../../tools/testing/dart/test_runner.dart"); | 9 #import("../../../tools/testing/dart/test_runner.dart"); |
| 10 #import("../../../tools/testing/dart/test_options.dart"); | 10 #import("../../../tools/testing/dart/test_options.dart"); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 void _writeToFile(File file, String content) { | 89 void _writeToFile(File file, String content) { |
| 90 if (content != null) { | 90 if (content != null) { |
| 91 var fd = new File(file.fullPathSync()).openSync(FileMode.WRITE); | 91 var fd = new File(file.fullPathSync()).openSync(FileMode.WRITE); |
| 92 fd.writeStringSync(content); | 92 fd.writeStringSync(content); |
| 93 fd.closeSync(); | 93 fd.closeSync(); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 String _readFile(File file) { | 97 String _readFile(File file) { |
| 98 return file.readAsTextSync(); | 98 return file.readAsStringSync(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 File _createFile(Path path) { | 101 File _createFile(Path path) { |
| 102 var file = new File(path.toNativePath()); | 102 var file = new File(path.toNativePath()); |
| 103 file.createSync(); | 103 file.createSync(); |
| 104 return file; | 104 return file; |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 class TestCompletedHandler { | 108 class TestCompletedHandler { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 runTest("fs_notUpToDate_snapshot", fs_notUpToDate_snapshot, true); | 191 runTest("fs_notUpToDate_snapshot", fs_notUpToDate_snapshot, true); |
| 192 runTest("fs_notUpToDate_dart", fs_notUpToDate_dart, true); | 192 runTest("fs_notUpToDate_dart", fs_notUpToDate_dart, true); |
| 193 // This is the only test where all dependencies are present and the test.js | 193 // This is the only test where all dependencies are present and the test.js |
| 194 // file is newer than all the others. So we pass 'false' for shouldRun. | 194 // file is newer than all the others. So we pass 'false' for shouldRun. |
| 195 runTest("fs_upToDate", fs_upToDate, false); | 195 runTest("fs_upToDate", fs_upToDate, false); |
| 196 } | 196 } |
| 197 // We need to wait some time to make sure that the files we 'touch' get a | 197 // We need to wait some time to make sure that the files we 'touch' get a |
| 198 // bigger timestamp than the old ones | 198 // bigger timestamp than the old ones |
| 199 new Timer(1000, touchFilesAndRunTests); | 199 new Timer(1000, touchFilesAndRunTests); |
| 200 } | 200 } |
| OLD | NEW |