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

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

Issue 9477013: Update ConstructorNamedArgumentTest to use the 'runtime-error' directive (Closed) Base URL: https://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
« no previous file with comments | « tests/language/src/ConstructorNamedArgumentsTest.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/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);
« no previous file with comments | « tests/language/src/ConstructorNamedArgumentsTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698