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

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

Issue 14103003: Remove use of Expect from test scripts and idlparser_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Run test scripts in checked mode. Created 7 years, 8 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
Index: tools/testing/dart/multitest.dart
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 44ba7731535caa2ed209bd8a52bad8d174659faa..1af62b24ed03e1b22d858f21e55cfd4dbcce617a 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -96,9 +96,10 @@ void ExtractTestsFromMultitest(Path filePath,
for (String nextOutcome in annotation.outcomesList) {
outcomes[annotation.key].add(nextOutcome);
if (!validMultitestOutcomes.contains(nextOutcome)) {
- Expect.fail(
- "Invalid test directive '$nextOutcome' on line ${lineCount}:\n"
- "${annotation.rest} ");
+ print(
+ "Invalid test directive '$nextOutcome' on line ${lineCount}:\n"
+ "${annotation.rest} ");
+ exit(1);
}
}
}
@@ -111,8 +112,9 @@ void ExtractTestsFromMultitest(Path filePath,
// Check that every key (other than the none case) has at least one outcome
for (var outcomeKey in outcomes.keys) {
if (outcomeKey != 'none' && outcomes[outcomeKey].isEmpty) {
- Expect.fail("Test ${outcomeKey} has no valid annotated outcomes.\n"
- "Expected one of: ${validMultitestOutcomes.toString()}");
+ print("Test ${outcomeKey} has no valid annotated outcomes.\n"
+ "Expected one of: ${validMultitestOutcomes.toString()}");
+ exit(1);
}
}
@@ -172,7 +174,8 @@ Set<Path> _findAllRelativeImports(Path topLibrary) {
// This is just for safety reasons, we don't want
// to unintentionally clobber files relative to the destination
// dir when copying them ove.
- Expect.fail("relative paths containing .. are not allowed.");
+ print("relative paths containing .. are not allowed.");
+ exit(1);
}
foundImports.add(relativePath);
toSearch.add(libraryDir.join(relativePath));
@@ -192,7 +195,7 @@ Future doMultitest(Path filePath, String outputDir, Path suiteDir,
Path sourceDir = filePath.directoryPath;
Path targetDir = CreateMultitestDirectory(outputDir, suiteDir);
- Expect.isNotNull(targetDir);
+ assert(targetDir != null);
// Copy all the relative imports of the multitest.
Set<Path> importsToCopy = _findAllRelativeImports(filePath);
« tools/test.py ('K') | « tools/test.py ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698