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

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: 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: 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..a76b7fdd601062c6cab4c6e04bf3c5116447304d 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 new Exception("Expected fail-unexpected");
+ }
} else {
- Expect.isFalse(output.unexpectedOutput);
+ if (output.unexpectedOutput) {
+ throw new Exception("Unexpected fail");
+ }
}
}
static void finished() {
- Expect.equals(numTests, numCompletedTests);
+ if (numTests != numCompletedTests) {
+ throw new Exception("bad completion count. " +
Lasse Reichstein Nielsen 2013/04/08 11:27:49 Remove '+'?
floitsch 2013/04/08 16:06:59 Done.
+ "expected: $numTests, actual: $numCompletedTests");
+ }
}
}
@@ -111,7 +118,8 @@ void main() {
return;
case 'fail-unexpected':
case 'fail':
- Expect.fail("This test always fails, to test the test scripts.");
+ throw new Exception(
+ "This test always fails, to test the test scripts.");
break;
case 'timeout':
// Run for 10 seconds, then exit. This tests a 2 second timeout.

Powered by Google App Engine
This is Rietveld 408576698