OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_native_api.h" | 6 #include "include/dart_native_api.h" |
7 | 7 |
8 #include "vm/unit_test.h" | 8 #include "vm/unit_test.h" |
9 | 9 |
10 // Custom Isolate Test. | 10 // Custom Isolate Test. |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 Dart_Handle send_port = Dart_NewSendPort(main_port_id); | 309 Dart_Handle send_port = Dart_NewSendPort(main_port_id); |
310 EXPECT_VALID(send_port); | 310 EXPECT_VALID(send_port); |
311 Dart_SetReturnValue(args, send_port); | 311 Dart_SetReturnValue(args, send_port); |
312 | 312 |
313 OS::Print("-- Exit: CustomIsolateImpl_start --\n"); | 313 OS::Print("-- Exit: CustomIsolateImpl_start --\n"); |
314 Dart_ExitScope(); | 314 Dart_ExitScope(); |
315 } | 315 } |
316 | 316 |
317 | 317 |
318 UNIT_TEST_CASE(CustomIsolates) { | 318 VM_UNIT_TEST_CASE(CustomIsolates) { |
319 bool saved_flag = FLAG_trace_shutdown; | 319 bool saved_flag = FLAG_trace_shutdown; |
320 FLAG_trace_shutdown = true; | 320 FLAG_trace_shutdown = true; |
321 FLAG_verify_handles = true; | 321 FLAG_verify_handles = true; |
322 #ifdef DEBUG | 322 #ifdef DEBUG |
323 FLAG_verify_on_transition = true; | 323 FLAG_verify_on_transition = true; |
324 #endif | 324 #endif |
325 event_queue = new EventQueue(); | 325 event_queue = new EventQueue(); |
326 | 326 |
327 Dart_Isolate dart_isolate = TestCase::CreateTestIsolate(); | 327 Dart_Isolate dart_isolate = TestCase::CreateTestIsolate(); |
328 EXPECT(dart_isolate != NULL); | 328 EXPECT(dart_isolate != NULL); |
(...skipping 27 matching lines...) Expand all Loading... |
356 OS::Print("-- Finished event loop --\n"); | 356 OS::Print("-- Finished event loop --\n"); |
357 EXPECT_STREQ("Received: 43", saved_echo); | 357 EXPECT_STREQ("Received: 43", saved_echo); |
358 free(saved_echo); | 358 free(saved_echo); |
359 | 359 |
360 delete event_queue; | 360 delete event_queue; |
361 event_queue = NULL; | 361 event_queue = NULL; |
362 FLAG_trace_shutdown = saved_flag; | 362 FLAG_trace_shutdown = saved_flag; |
363 } | 363 } |
364 | 364 |
365 } // namespace dart | 365 } // namespace dart |
OLD | NEW |