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

Unified Diff: tests/standalone/io/test_runner_test.dart

Issue 13724021: Remove deprecated Expect from the libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Rebase. 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
« no previous file with comments | « tests/standalone/io/stdout_stderr_test.dart ('k') | tests/standalone/status_expression_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/test_runner_test.dart
diff --git a/tests/standalone/io/test_runner_test.dart b/tests/standalone/io/test_runner_test.dart
index b9ad2c6123454893fdf673d082bc7385078ae9a0..f4a975daf954f67bc2369f50befbb2b16df74932 100644
--- a/tests/standalone/io/test_runner_test.dart
+++ b/tests/standalone/io/test_runner_test.dart
@@ -24,14 +24,21 @@ class TestController {
numCompletedTests++;
CommandOutput output = testCase.lastCommandOutput;
if (testCase.displayName == "fail-unexpected") {
- Expect.isTrue(output.unexpectedOutput);
+ if (!output.unexpectedOutput) {
+ throw "Expected fail-unexpected";
+ }
} else {
- Expect.isFalse(output.unexpectedOutput);
+ if (output.unexpectedOutput) {
+ throw "Unexpected fail";
+ }
}
}
static void finished() {
- Expect.equals(numTests, numCompletedTests);
+ if (numTests != numCompletedTests) {
+ throw "bad completion count. "
+ "expected: $numTests, actual: $numCompletedTests";
+ }
}
}
@@ -111,7 +118,7 @@ void main() {
return;
case 'fail-unexpected':
case 'fail':
- Expect.fail("This test always fails, to test the test scripts.");
+ throw "This test always fails, to test the test scripts.";
break;
case 'timeout':
// Run for 10 seconds, then exit. This tests a 2 second timeout.
« no previous file with comments | « tests/standalone/io/stdout_stderr_test.dart ('k') | tests/standalone/status_expression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698