Chromium Code Reviews| Index: tools/testing/dart/multitest.dart |
| diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart |
| index 1f68f8f50addf45586ba64f845efe85b54f25cf2..48ddf5286c0566aba386dc68fa63ed89abb35047 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,26 @@ 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); |
| + doTest(filename, |
| + isNegative, |
| + isNegativeIfChecked, |
| + enableFatalTypeErrors); |
| // TODO(whesse): Register files and directories to be deleted. |
| // They should be registered in a persistent list, so they can |
|
Bill Hesse
2011/12/02 13:10:06
Remove this TODO - we are not planning to delete g
Mads Ager (google)
2011/12/02 13:32:49
Done.
|
| // be deleted later even if the test script is interrupted. |
| - WriteMultitestToFileAndQueueIt(tests, outcomes, currentKey, |
| - basePath, doTest, done); |
| + WriteMultitestToFileAndQueueIt(tests, |
| + outcomes, |
| + supportsFatalTypeErrors, |
| + currentKey, |
| + basePath, |
| + doTest, |
| + done); |
| }; |
| file.create(); |
| } |