Chromium Code Reviews| 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 973 const RegExp(r"/// ([0-9][0-9]:){0,1}\s*static type warning"); | 973 const RegExp(r"/// ([0-9][0-9]:){0,1}\s*static type warning"); |
| 974 RegExp compileTimeRegExp = | 974 RegExp compileTimeRegExp = |
| 975 const RegExp(r"/// ([0-9][0-9]:){0,1}\s*compile-time error"); | 975 const RegExp(r"/// ([0-9][0-9]:){0,1}\s*compile-time error"); |
| 976 RegExp staticCleanRegExp = const RegExp(r"// @static-clean"); | 976 RegExp staticCleanRegExp = const RegExp(r"// @static-clean"); |
| 977 RegExp leadingHashRegExp = const RegExp(r"^#", multiLine: true); | 977 RegExp leadingHashRegExp = const RegExp(r"^#", multiLine: true); |
| 978 RegExp isolateStubsRegExp = const RegExp(r"// IsolateStubs=(.*)"); | 978 RegExp isolateStubsRegExp = const RegExp(r"// IsolateStubs=(.*)"); |
| 979 RegExp domImportRegExp = | 979 RegExp domImportRegExp = |
| 980 const RegExp(r"^#import.*(dart:(dom|html)|html\.dart).*\)", | 980 const RegExp(r"^#import.*(dart:(dom|html)|html\.dart).*\)", |
| 981 multiLine: true); | 981 multiLine: true); |
| 982 RegExp libraryDefinitionRegExp = | 982 RegExp libraryDefinitionRegExp = |
| 983 const RegExp(r"^#library\(", multiLine: true); | 983 const RegExp(r"^[#]?library[\( ]", multiLine: true); |
| 984 RegExp sourceOrImportRegExp = | 984 RegExp sourceOrImportRegExp = |
| 985 const RegExp(r"^#(source|import|resource)\(", multiLine: true); | 985 const RegExp(r"^#(source|import|resource)\(", multiLine: true); |
|
Siggi Cherem (dart-lang)
2012/10/31 20:54:02
it is important to fix also the sourceOrImportRegE
gram
2012/11/01 21:23:19
Done that. I added a regexp too for part of so we
| |
| 986 | 986 |
| 987 // Read the entire file into a byte buffer and transform it to a | 987 // Read the entire file into a byte buffer and transform it to a |
| 988 // String. This will treat the file as ascii but the only parts | 988 // String. This will treat the file as ascii but the only parts |
| 989 // we are interested in will be ascii in any case. | 989 // we are interested in will be ascii in any case. |
| 990 RandomAccessFile file = new File.fromPath(filePath).openSync(FileMode.READ); | 990 RandomAccessFile file = new File.fromPath(filePath).openSync(FileMode.READ); |
| 991 List chars = new List(file.lengthSync()); | 991 List chars = new List(file.lengthSync()); |
| 992 var offset = 0; | 992 var offset = 0; |
| 993 while (offset != chars.length) { | 993 while (offset != chars.length) { |
| 994 offset += file.readListSync(chars, offset, chars.length - offset); | 994 offset += file.readListSync(chars, offset, chars.length - offset); |
| 995 } | 995 } |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1486 * $noCrash tests are expected to be flaky but not crash | 1486 * $noCrash tests are expected to be flaky but not crash |
| 1487 * $pass tests are expected to pass | 1487 * $pass tests are expected to pass |
| 1488 * $failOk tests are expected to fail that we won't fix | 1488 * $failOk tests are expected to fail that we won't fix |
| 1489 * $fail tests are expected to fail that we should fix | 1489 * $fail tests are expected to fail that we should fix |
| 1490 * $crash tests are expected to crash that we should fix | 1490 * $crash tests are expected to crash that we should fix |
| 1491 * $timeout tests are allowed to timeout | 1491 * $timeout tests are allowed to timeout |
| 1492 """; | 1492 """; |
| 1493 print(report); | 1493 print(report); |
| 1494 } | 1494 } |
| 1495 } | 1495 } |
| OLD | NEW |