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

Unified Diff: runtime/vm/isolate_test.cc

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 5 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 | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/snapshot_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_test.cc
diff --git a/runtime/vm/isolate_test.cc b/runtime/vm/isolate_test.cc
index 7655fad7c070837e9ceeeaff396d2d6d5cb4d9ab..74379a2adb65bc21af3dde6e1d8b0843f0556caf 100644
--- a/runtime/vm/isolate_test.cc
+++ b/runtime/vm/isolate_test.cc
@@ -17,23 +17,17 @@ UNIT_TEST_CASE(IsolateCurrent) {
delete isolate;
}
-
// Only ia32 and x64 can run dart execution tests.
#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
-// Unit test case to verify error during isolate spawning (application classes
-// not loaded into the isolate).
+// Test to ensure that an exception is thrown if no isolate creation
+// callback has been set by the embedder when an isolate is spawned.
TEST_CASE(IsolateSpawn) {
const char* kScriptChars =
"#import('dart:isolate');\n"
- "class SpawnNewIsolate extends Isolate {\n"
- " SpawnNewIsolate() : super() { }\n"
- " void main() {\n"
- " }\n"
- "}\n"
+ "void entry() {}\n"
"int testMain() {\n"
" try {\n"
- " new SpawnNewIsolate().spawn().then(function(SendPort port) {\n"
- " });\n"
+ " spawnFunction(entry);\n"
" } catch (var e) {\n"
" throw;\n"
" }\n"
@@ -41,7 +35,7 @@ TEST_CASE(IsolateSpawn) {
"}\n";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_Handle result = Dart_Invoke(lib, Dart_NewString("testMain"), 0, NULL);
- EXPECT(Dart_IsError(result));
+ EXPECT_ERROR(result, "Null callback specified for isolate creation");
EXPECT(Dart_ErrorHasException(result));
Dart_Handle exception_result = Dart_ErrorGetException(result);
EXPECT_VALID(exception_result);
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/snapshot_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698