| 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 /** | 5 /** |
| 6 * Classes and methods for enumerating and preparing tests. | 6 * Classes and methods for enumerating and preparing tests. |
| 7 * | 7 * |
| 8 * This library includes: | 8 * This library includes: |
| 9 * | 9 * |
| 10 * - Creating tests by listing all the Dart files in certain directories, | 10 * - Creating tests by listing all the Dart files in certain directories, |
| (...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1511 base = new Path('/'); | 1511 base = new Path('/'); |
| 1512 } | 1512 } |
| 1513 Directory dir = new Directory.fromPath(base); | 1513 Directory dir = new Directory.fromPath(base); |
| 1514 Expect.isTrue(dir.existsSync(), | 1514 Expect.isTrue(dir.existsSync(), |
| 1515 "Expected ${dir} to already exist"); | 1515 "Expected ${dir} to already exist"); |
| 1516 var segments = relativePath.segments(); | 1516 var segments = relativePath.segments(); |
| 1517 for (String segment in segments) { | 1517 for (String segment in segments) { |
| 1518 // Ugly hack: if Windows absolute path starts with a drive, | 1518 // Ugly hack: if Windows absolute path starts with a drive, |
| 1519 // rewrite [base] properly. | 1519 // rewrite [base] properly. |
| 1520 if (segment.length == 2 && segment.endsWith(':')) { | 1520 if (segment.length == 2 && segment.endsWith(':')) { |
| 1521 base = new Directory.fromPath('${segment}\\'); | 1521 base = new Path('${segment}\\'); |
| 1522 continue; | 1522 continue; |
| 1523 } | 1523 } |
| 1524 base = base.append(segment); | 1524 base = base.append(segment); |
| 1525 dir = new Directory.fromPath(base); | 1525 dir = new Directory.fromPath(base); |
| 1526 if (!dir.existsSync()) { | 1526 if (!dir.existsSync()) { |
| 1527 dir.createSync(); | 1527 dir.createSync(); |
| 1528 } | 1528 } |
| 1529 Expect.isTrue(dir.existsSync(), "Failed to create ${dir.path}"); | 1529 Expect.isTrue(dir.existsSync(), "Failed to create ${dir.path}"); |
| 1530 } | 1530 } |
| 1531 return dir; | 1531 return dir; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 * $pass tests are expected to pass | 1681 * $pass tests are expected to pass |
| 1682 * $failOk tests are expected to fail that we won't fix | 1682 * $failOk tests are expected to fail that we won't fix |
| 1683 * $fail tests are expected to fail that we should fix | 1683 * $fail tests are expected to fail that we should fix |
| 1684 * $crash tests are expected to crash that we should fix | 1684 * $crash tests are expected to crash that we should fix |
| 1685 * $timeout tests are allowed to timeout | 1685 * $timeout tests are allowed to timeout |
| 1686 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1686 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1687 """; | 1687 """; |
| 1688 print(report); | 1688 print(report); |
| 1689 } | 1689 } |
| 1690 } | 1690 } |
| OLD | NEW |