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

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

Issue 9466008: Use the component information when the test is being scheduled instead of when it's being created. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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
« tools/testing/dart/multitest.dart ('K') | « tools/testing/dart/multitest.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
===================================================================
--- tools/testing/dart/test_suite.dart (revision 4566)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -177,9 +177,11 @@
bool isNegative;
bool isNegativeIfChecked;
bool hasFatalTypeErrors;
+ bool hasRuntimeErrors;
TestInformation(this.filename, this.optionsFromFile, this.isNegative,
- this.isNegativeIfChecked, this.hasFatalTypeErrors);
+ this.isNegativeIfChecked, this.hasFatalTypeErrors,
+ this.hasRuntimeErrors);
}
@@ -334,17 +336,27 @@
expectations, isNegative);
break;
default:
- // Only dartc supports fatal type errors. Enable fatal type
- // errors with a flag and treat tests that have fatal type
- // errors as negative.
- var enableFatalTypeErrors =
- (info.hasFatalTypeErrors && configuration['component'] == 'dartc');
+ isNegative = isNegative ||
+ (configuration['checked'] && info.isNegativeIfChecked);
+ bool enableFatalTypeErrors = false;
+
+ if (configuration['component'] == 'dartc') {
+ // Only dartc supports fatal type errors. Enable fatal type
+ // errors with a flag and treat tests that have fatal type
+ // errors as negative.
+ // Also, tests that have runtime errors are not negative
+ // tests for dartc because dartc does not execute the test.
+ if (info.hasFatalTypeErrors) {
+ enableFatalTypeErrors = true;
+ isNegative = true;
+ } else if (info.hasRuntimeErrors) {
+ isNegative = false;
+ }
+ }
+
var argumentLists = argumentListsFromFile(filename,
optionsFromFile,
enableFatalTypeErrors);
- isNegative = isNegative ||
- (configuration['checked'] && info.isNegativeIfChecked) ||
- enableFatalTypeErrors;
for (var args in argumentLists) {
doTest(new TestCase('$suiteName/$testName',
@@ -362,13 +374,15 @@
return (String filename,
bool isNegative,
[bool isNegativeIfChecked = false,
- bool hasFatalTypeErrors = false]) {
+ bool hasFatalTypeErrors = false,
+ bool hasRuntimeErrors = false]) {
// Cache the test information for each test case.
var info = new TestInformation(filename,
optionsFromFile,
isNegative,
isNegativeIfChecked,
- hasFatalTypeErrors);
+ hasFatalTypeErrors,
+ hasRuntimeErrors);
cachedTests.add(info);
enqueueTestCaseFromTestInformation(info);
};
« tools/testing/dart/multitest.dart ('K') | « tools/testing/dart/multitest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698