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

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

Issue 8773036: Make multi tests work with DartC. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 9 years 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/test-runtime.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/multitest.dart
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 1f68f8f50addf45586ba64f845efe85b54f25cf2..4e433c7ebbb4ebdef31e7cc1525130483c79443f 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -118,6 +118,7 @@ void ExtractTestsFromMultitest(String filename,
void DoMultitest(String filename,
String buildDir,
String testDir,
+ bool supportsFatalTypeErrors,
Function doTest(String filename,
bool isNegative,
[bool isNegativeIfChecked]),
@@ -133,9 +134,13 @@ void DoMultitest(String filename,
int end = filename.indexOf('.dart', start);
String baseFilename = filename.substring(start, end);
Iterator currentKey = tests.getKeys().iterator();
- WriteMultitestToFileAndQueueIt(tests, outcomes, currentKey,
+ WriteMultitestToFileAndQueueIt(tests,
+ outcomes,
+ supportsFatalTypeErrors,
+ currentKey,
'$directory$pathSeparator$baseFilename',
- doTest, multitestDone);
+ doTest,
+ multitestDone);
}
@@ -143,6 +148,7 @@ void DoMultitest(String filename,
// to serialize the file operations, rather than opening all files at once.
WriteMultitestToFileAndQueueIt(Map<String, String> tests,
Map<String, String> outcomes,
+ bool supportsFatalTypeErrors,
Iterator currentKey,
String basePath,
Function doTest,
@@ -169,15 +175,23 @@ WriteMultitestToFileAndQueueIt(Map<String, String> tests,
};
file.closeHandler = () {
var outcome = outcomes[key];
- bool isNegative = outcome.contains('compile-time error') ||
- outcome.contains('runtime error');
+ bool enableFatalTypeErrors = (supportsFatalTypeErrors &&
+ outcome.contains('static type error'));
+ bool isNegative = (outcome.contains('compile-time error') ||
+ outcome.contains('runtime error') ||
+ enableFatalTypeErrors);
bool isNegativeIfChecked = outcome.contains('type error');
- doTest(filename, isNegative, isNegativeIfChecked);
- // TODO(whesse): Register files and directories to be deleted.
- // They should be registered in a persistent list, so they can
- // be deleted later even if the test script is interrupted.
- WriteMultitestToFileAndQueueIt(tests, outcomes, currentKey,
- basePath, doTest, done);
+ doTest(filename,
+ isNegative,
+ isNegativeIfChecked,
+ enableFatalTypeErrors);
+ WriteMultitestToFileAndQueueIt(tests,
+ outcomes,
+ supportsFatalTypeErrors,
+ currentKey,
+ basePath,
+ doTest,
+ done);
};
file.create();
}
« no previous file with comments | « tools/test-runtime.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698