| 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 * conformance to the Dart language. Any Dart implementation must | 1526 * conformance to the Dart language. Any Dart implementation must |
| 1527 * pass the co19 test suite as is, and not require extra flags, | 1527 * pass the co19 test suite as is, and not require extra flags, |
| 1528 * environment variables, configuration files, etc. | 1528 * environment variables, configuration files, etc. |
| 1529 */ | 1529 */ |
| 1530 Map readOptionsFromCo19File(Path filePath) { | 1530 Map readOptionsFromCo19File(Path filePath) { |
| 1531 String contents = decodeUtf8(new File(filePath.toNativePath()) | 1531 String contents = decodeUtf8(new File(filePath.toNativePath()) |
| 1532 .readAsBytesSync()); | 1532 .readAsBytesSync()); |
| 1533 | 1533 |
| 1534 bool hasCompileError = contents.contains("@compile-error"); | 1534 bool hasCompileError = contents.contains("@compile-error"); |
| 1535 bool hasRuntimeError = contents.contains("@runtime-error"); | 1535 bool hasRuntimeError = contents.contains("@runtime-error"); |
| 1536 bool hasDynamicTypeError = contents.contains("@dynamic-type-error"); | |
| 1537 bool hasStaticWarning = contents.contains("@static-warning"); | 1536 bool hasStaticWarning = contents.contains("@static-warning"); |
| 1538 bool isMultitest = multiTestRegExp.hasMatch(contents); | 1537 bool isMultitest = multiTestRegExp.hasMatch(contents); |
| 1539 | 1538 |
| 1540 if (hasDynamicTypeError) { | |
| 1541 // TODO(ahe): Remove this warning when co19 no longer uses this tag. | |
| 1542 | |
| 1543 // @dynamic-type-error has been replaced by tests that use | |
| 1544 // tests/co19/src/Utils/dynamic_check.dart to dynamically detect | |
| 1545 // if a test is running in checked mode or not and change its | |
| 1546 // expectations accordingly. | |
| 1547 | |
| 1548 // Using stderr.writeString to avoid breaking dartc/junit_tests | |
| 1549 // which parses the output of the --list option. | |
| 1550 stderr.writeln( | |
| 1551 "Warning: deprecated @dynamic-type-error tag used in $filePath"); | |
| 1552 } | |
| 1553 | |
| 1554 return { | 1539 return { |
| 1555 "vmOptions": <List>[[]], | 1540 "vmOptions": <List>[[]], |
| 1556 "sharedOptions": <String>[], | 1541 "sharedOptions": <String>[], |
| 1557 "dartOptions": null, | 1542 "dartOptions": null, |
| 1558 "packageRoot": null, | 1543 "packageRoot": null, |
| 1559 "hasCompileError": hasCompileError, | 1544 "hasCompileError": hasCompileError, |
| 1560 "hasRuntimeError": hasRuntimeError, | 1545 "hasRuntimeError": hasRuntimeError, |
| 1561 "hasStaticWarning" : hasStaticWarning, | 1546 "hasStaticWarning" : hasStaticWarning, |
| 1562 "otherScripts": <String>[], | 1547 "otherScripts": <String>[], |
| 1563 "isMultitest": isMultitest, | 1548 "isMultitest": isMultitest, |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 * $pass tests are expected to pass | 2024 * $pass tests are expected to pass |
| 2040 * $failOk tests are expected to fail that we won't fix | 2025 * $failOk tests are expected to fail that we won't fix |
| 2041 * $fail tests are expected to fail that we should fix | 2026 * $fail tests are expected to fail that we should fix |
| 2042 * $crash tests are expected to crash that we should fix | 2027 * $crash tests are expected to crash that we should fix |
| 2043 * $timeout tests are allowed to timeout | 2028 * $timeout tests are allowed to timeout |
| 2044 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 2029 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 2045 """; | 2030 """; |
| 2046 print(report); | 2031 print(report); |
| 2047 } | 2032 } |
| 2048 } | 2033 } |
| OLD | NEW |