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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 Dart_ExitScope(); | 316 Dart_ExitScope(); |
317 } | 317 } |
318 | 318 |
319 | 319 |
320 UNIT_TEST_CASE(CustomIsolates) { | 320 UNIT_TEST_CASE(CustomIsolates) { |
321 bool saved_flag = FLAG_trace_shutdown; | 321 bool saved_flag = FLAG_trace_shutdown; |
322 FLAG_trace_shutdown = true; | 322 FLAG_trace_shutdown = true; |
323 FLAG_verify_handles = true; | 323 FLAG_verify_handles = true; |
324 #ifdef DEBUG | 324 #ifdef DEBUG |
325 FLAG_verify_on_transition = true; | 325 FLAG_verify_on_transition = true; |
326 #endif | 326 // Cannot verify heap while running compilation in background. Issue #26149. |
327 // Cannot verify heap while running compilation in background. | |
328 // Issue #26149. | |
329 FLAG_background_compilation = false; | 327 FLAG_background_compilation = false; |
330 // Issue #26150. | 328 // Issue #26150. |
331 FLAG_use_osr = false; | 329 FLAG_use_osr = false; |
332 | 330 #endif |
333 event_queue = new EventQueue(); | 331 event_queue = new EventQueue(); |
334 | 332 |
335 Dart_Isolate dart_isolate = TestCase::CreateTestIsolate(); | 333 Dart_Isolate dart_isolate = TestCase::CreateTestIsolate(); |
336 EXPECT(dart_isolate != NULL); | 334 EXPECT(dart_isolate != NULL); |
337 Dart_SetMessageNotifyCallback(&NotifyMessage); | 335 Dart_SetMessageNotifyCallback(&NotifyMessage); |
338 Dart_EnterScope(); | 336 Dart_EnterScope(); |
339 Dart_Handle result; | 337 Dart_Handle result; |
340 | 338 |
341 // Create a test library. | 339 // Create a test library. |
342 Dart_Handle lib = TestCase::LoadTestScript(kCustomIsolateScriptChars, | 340 Dart_Handle lib = TestCase::LoadTestScript(kCustomIsolateScriptChars, |
(...skipping 21 matching lines...) Expand all Loading... |
364 OS::Print("-- Finished event loop --\n"); | 362 OS::Print("-- Finished event loop --\n"); |
365 EXPECT_STREQ("Received: 43", saved_echo); | 363 EXPECT_STREQ("Received: 43", saved_echo); |
366 free(saved_echo); | 364 free(saved_echo); |
367 | 365 |
368 delete event_queue; | 366 delete event_queue; |
369 event_queue = NULL; | 367 event_queue = NULL; |
370 FLAG_trace_shutdown = saved_flag; | 368 FLAG_trace_shutdown = saved_flag; |
371 } | 369 } |
372 | 370 |
373 } // namespace dart | 371 } // namespace dart |
OLD | NEW |