Index: dart/tests/isolate/spawn_uri_missing_test.dart |
diff --git a/dart/tests/isolate/spawn_uri_missing_test.dart b/dart/tests/isolate/spawn_uri_missing_test.dart |
index c3dd4d32f4aa2ea316491c2f64aaca24a4d069d3..f342fe216bddae80774a1b77b01a0e23978d857f 100644 |
--- a/dart/tests/isolate/spawn_uri_missing_test.dart |
+++ b/dart/tests/isolate/spawn_uri_missing_test.dart |
@@ -12,11 +12,14 @@ import 'dart:async'; |
import 'package:async_helper/async_helper.dart'; |
+const UNEXPECTED_MESSAGE = 'Created isolate from missing file.'; |
+ |
Future doTest() { |
return Isolate.spawnUri(Uri.base.resolve('no_such_file'), [], null) |
.then((Isolate isolate) { |
- throw 'Created isolate from missing file'; |
+ throw UNEXPECTED_MESSAGE; |
}).catchError((error) { |
+ if (error == UNEXPECTED_MESSAGE) throw error; |
print('An error was thrown as expected'); |
return null; |
}); |
Lasse Reichstein Nielsen
2014/05/27 12:09:15
This seem overly complicated. Try this:
return
ahe
2014/05/27 13:31:27
We talked about this, and I was surprised that it
|