Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: tools/testing/dart/test_suite.dart

Issue 150223002: Add 'static type error' tags to multitests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename 'static type error' to 'checked mode compile-time error'. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 2a2e80973c17f4e7c7e3b964b5287f530b96c9e5..e3d5b484ad4cbd667dc82cb1a0cd4ceaab9acae7 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -35,6 +35,7 @@ typedef void CreateTest(Path filePath,
bool hasCompileError,
bool hasRuntimeError,
{bool isNegativeIfChecked,
+ bool hasCompileErrorIfChecked,
bool hasStaticWarning,
Set<String> multitestOutcome,
String multitestKey,
@@ -315,7 +316,7 @@ abstract class TestSuite {
if (configuration['report']) {
SummaryReport.add(expectations);
if (testCase.info != null &&
- testCase.info.hasCompileError &&
+ testCase.expectCompileError &&
TestUtils.isBrowserRuntime(configuration['runtime']) &&
configuration['compiler'] != 'none') {
SummaryReport.addCompileErrorSkipTest();
@@ -607,13 +608,15 @@ class TestInformation {
bool hasCompileError;
bool hasRuntimeError;
bool isNegativeIfChecked;
+ bool hasCompileErrorIfChecked;
bool hasStaticWarning;
Set<String> multitestOutcome;
String multitestKey;
TestInformation(this.filePath, this.optionsFromFile,
this.hasCompileError, this.hasRuntimeError,
- this.isNegativeIfChecked, this.hasStaticWarning,
+ this.isNegativeIfChecked, this.hasCompileErrorIfChecked,
+ this.hasStaticWarning,
this.multitestOutcome,
{this.multitestKey, this.originTestPath}) {
assert(filePath.isAbsolute);
@@ -930,7 +933,7 @@ class StandardTestSuite extends TestSuite {
multitestName: optionsFromFile['isMultitest'] ? info.multitestKey : "");
Set<Expectation> expectations = testExpectations.expectations(testName);
- if (configuration['compiler'] != 'none' && info.hasCompileError) {
+ if (configuration['compiler'] != 'none' && expectCompileError(info)) {
// If a compile-time error is expected, and we're testing a
// compiler, we never need to attempt to run the program (in a
// browser or otherwise).
@@ -986,8 +989,13 @@ class StandardTestSuite extends TestSuite {
}
}
+ bool expectCompileError(TestInformation info) {
+ return info.hasCompileError ||
+ (configuration['checked'] && info.hasCompileErrorIfChecked);
+ }
+
bool isNegative(TestInformation info) {
- bool negative = info.hasCompileError ||
+ bool negative = expectCompileError(info) ||
(configuration['checked'] && info.isNegativeIfChecked);
if (info.hasRuntimeError && hasRuntime) {
negative = true;
@@ -1016,7 +1024,7 @@ class StandardTestSuite extends TestSuite {
}
List<Command> commands = <Command>[command];
- if (info.hasCompileError) {
+ if (expectCompileError(info)) {
// Do not attempt to run the compiled result. A compilation
// error should be reported by the compilation command.
} else if (configuration['runtime'] == 'd8') {
@@ -1040,7 +1048,7 @@ class StandardTestSuite extends TestSuite {
compiler, "$tempDir/out.dart", !useSdk,
dart2JsBootstrapDependencies, compilerPath, args,
environmentOverrides)];
- if (info.hasCompileError) {
+ if (expectCompileError(info)) {
// Do not attempt to run the compiled result. A compilation
// error should be reported by the compilation command.
} else if (configuration['runtime'] == 'vm') {
@@ -1084,6 +1092,7 @@ class StandardTestSuite extends TestSuite {
bool hasCompileError,
bool hasRuntimeError,
{bool isNegativeIfChecked: false,
+ bool hasCompileErrorIfChecked: false,
bool hasStaticWarning: false,
Set<String> multitestOutcome: null,
String multitestKey,
@@ -1094,6 +1103,7 @@ class StandardTestSuite extends TestSuite {
hasCompileError,
hasRuntimeError,
isNegativeIfChecked,
+ hasCompileErrorIfChecked,
hasStaticWarning,
multitestOutcome,
multitestKey: multitestKey,
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698