| 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 7109416246e1a9895fcbc6d8d0e8a17d9b2bc411..0c721a5deca7854ea8ca65133ffc6a7600ae0003 100644
|
| --- a/tests/standalone/io/test_extension_fail_test.dart
|
| +++ b/tests/standalone/io/test_extension_fail_test.dart
|
| @@ -17,7 +17,8 @@ Future copyFileToDirectory(Path file, Path directory) {
|
| case 'windows':
|
| return Process.run('cmd.exe', ['/C', 'copy $src $dst']);
|
| default:
|
| - Expect.fail('Unknown operating system ${Platform.operatingSystem}');
|
| + throw new RuntimeError(
|
| + 'Unknown operating system ${Platform.operatingSystem}');
|
| }
|
| }
|
|
|
| @@ -30,7 +31,8 @@ Path getExtensionPath(Path buildDirectory) {
|
| case 'windows':
|
| return buildDirectory.append('test_extension.dll');
|
| default:
|
| - Expect.fail('Unknown operating system ${Platform.operatingSystem}');
|
| + throw new RuntimeError(
|
| + 'Unknown operating system ${Platform.operatingSystem}');
|
| }
|
| }
|
|
|
| @@ -58,8 +60,14 @@ void main() {
|
| }).then((ProcessResult result) {
|
| print("ERR: ${result.stderr}\n\n");
|
| print("OUT: ${result.stdout}\n\n");
|
| - Expect.equals(255, result.exitCode);
|
| - Expect.isTrue(result.stderr.contains("Unhandled exception:"));
|
| - Expect.isTrue(result.stderr.contains("ball"));
|
| + 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'.");
|
| + }
|
| }).whenComplete(() => tempDirectory.deleteSync(recursive: true));
|
| }
|
|
|