| 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 #library("multitest"); | 5 library multitest; |
| 6 | 6 |
| 7 #import("dart:io"); | 7 import "dart:io"; |
| 8 #import("test_suite.dart"); | 8 import "test_suite.dart"; |
| 9 | 9 |
| 10 // Multitests are Dart test scripts containing lines of the form | 10 // Multitests are Dart test scripts containing lines of the form |
| 11 // " [some dart code] /// [key]: [error type]" | 11 // " [some dart code] /// [key]: [error type]" |
| 12 // | 12 // |
| 13 // For each key in the file, a new test file is made containing all | 13 // For each key in the file, a new test file is made containing all |
| 14 // the normal lines of the file, and all of the multitest lines containing | 14 // the normal lines of the file, and all of the multitest lines containing |
| 15 // that key, in the same order as in the source file. The new test | 15 // that key, in the same order as in the source file. The new test |
| 16 // is expected to fail if there is a non-empty error type listed, of | 16 // is expected to fail if there is a non-empty error type listed, of |
| 17 // type 'compile-time error', 'runtime error', 'static type warning', or | 17 // type 'compile-time error', 'runtime error', 'static type warning', or |
| 18 // 'dynamic type error'. The type error tests fail only in checked mode. | 18 // 'dynamic type error'. The type error tests fail only in checked mode. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // TestSuite.forDirectory. | 259 // TestSuite.forDirectory. |
| 260 split.removeLast(); | 260 split.removeLast(); |
| 261 } | 261 } |
| 262 String path = '${generatedTestDir.path}/${split.last}'; | 262 String path = '${generatedTestDir.path}/${split.last}'; |
| 263 Directory dir = new Directory(path); | 263 Directory dir = new Directory(path); |
| 264 if (!dir.existsSync()) { | 264 if (!dir.existsSync()) { |
| 265 dir.createSync(); | 265 dir.createSync(); |
| 266 } | 266 } |
| 267 return new Path.fromNative(new File(path).fullPathSync()); | 267 return new Path.fromNative(new File(path).fullPathSync()); |
| 268 } | 268 } |
| OLD | NEW |