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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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_extension_fail_test.dart
diff --git a/tests/standalone/io/test_extension_fail_test.dart b/tests/standalone/io/test_extension_fail_test.dart
index 0c721a5deca7854ea8ca65133ffc6a7600ae0003..7109416246e1a9895fcbc6d8d0e8a17d9b2bc411 100644
--- a/tests/standalone/io/test_extension_fail_test.dart
+++ b/tests/standalone/io/test_extension_fail_test.dart
@@ -17,8 +17,7 @@ Future copyFileToDirectory(Path file, Path directory) {
case 'windows':
return Process.run('cmd.exe', ['/C', 'copy $src $dst']);
default:
- throw new RuntimeError(
- 'Unknown operating system ${Platform.operatingSystem}');
+ Expect.fail('Unknown operating system ${Platform.operatingSystem}');
}
}
@@ -31,8 +30,7 @@ Path getExtensionPath(Path buildDirectory) {
case 'windows':
return buildDirectory.append('test_extension.dll');
default:
- throw new RuntimeError(
- 'Unknown operating system ${Platform.operatingSystem}');
+ Expect.fail('Unknown operating system ${Platform.operatingSystem}');
}
}
@@ -60,14 +58,8 @@ void main() {
}).then((ProcessResult result) {
print("ERR: ${result.stderr}\n\n");
print("OUT: ${result.stdout}\n\n");
- if (result.exitCode != 255) {
- throw new RuntimeError("bad exit code");
- }
- if (!result.stderr.contains("Unhandled exception:")) {
- throw new RuntimeError("stderr doesn't contain unhandled exception.");
- }
- if (!result.stderr.contains("ball")) {
- throw new RuntimeError("stderr doesn't contain 'ball'.");
- }
+ Expect.equals(255, result.exitCode);
+ Expect.isTrue(result.stderr.contains("Unhandled exception:"));
+ Expect.isTrue(result.stderr.contains("ball"));
}).whenComplete(() => tempDirectory.deleteSync(recursive: true));
}
« no previous file with comments | « tests/standalone/io/string_transformer_test.dart ('k') | tests/standalone/io/test_extension_fail_tester.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698