Index: tools/testing/dart/multitest.dart |
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart |
index 64f09ce789ed3c6bd6929cf5428178dc34b1a99f..a637c987e23872ae08b9ca0b87ac5a08127bd96f 100644 |
--- a/tools/testing/dart/multitest.dart |
+++ b/tools/testing/dart/multitest.dart |
@@ -81,7 +81,9 @@ void ExtractTestsFromMultitest(String filename, |
// except dart: or /, at the beginning of a line. |
RegExp relativeImportRegExp = |
const RegExp('^#(import|source)[(]["\'](?!(dart:|/))'); |
+ int lineCount = 0; |
for (String line in lines) { |
+ lineCount++; |
if (line.contains('///')) { |
var parts = line.split('///')[1].split(':'); |
var key = parts[0].trim(); |
@@ -92,7 +94,9 @@ void ExtractTestsFromMultitest(String filename, |
} else { |
(testsAsLines[key] = new List<String>.from(testTemplate)).add(line); |
outcomes[key] = rest; |
- Expect.isTrue(validMultitestOutcomes.contains(rest)); |
+ if (!validMultitestOutcomes.contains(rest)) { |
+ Expect.fail("Invalid test directive on line ${lineCount}: $rest "); |
+ } |
} |
} else { |
testTemplate.add(line); |