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

Side by Side Diff: runtime/vm/isolate_test.cc

Issue 1553233002: Add package config support to dart:isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed review comments. Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/globals.h" 7 #include "vm/globals.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/lockers.h" 9 #include "vm/lockers.h"
10 #include "vm/thread_barrier.h" 10 #include "vm/thread_barrier.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 args[0] = schedule_immediate_closure; 67 args[0] = schedule_immediate_closure;
68 url = NewString("dart:async"); 68 url = NewString("dart:async");
69 DART_CHECK_VALID(url); 69 DART_CHECK_VALID(url);
70 Dart_Handle async_lib = Dart_LookupLibrary(url); 70 Dart_Handle async_lib = Dart_LookupLibrary(url);
71 DART_CHECK_VALID(async_lib); 71 DART_CHECK_VALID(async_lib);
72 DART_CHECK_VALID(Dart_Invoke( 72 DART_CHECK_VALID(Dart_Invoke(
73 async_lib, NewString("_setScheduleImmediateClosure"), 1, args)); 73 async_lib, NewString("_setScheduleImmediateClosure"), 1, args));
74 74
75 75
76 result = Dart_Invoke(test_lib, NewString("testMain"), 0, NULL); 76 result = Dart_Invoke(test_lib, NewString("testMain"), 0, NULL);
77 EXPECT(!Dart_IsError(result)); 77 EXPECT_VALID(result);
78 // Run until all ports to isolate are closed. 78 // Run until all ports to isolate are closed.
79 result = Dart_RunLoop(); 79 result = Dart_RunLoop();
80 EXPECT_ERROR(result, 80 EXPECT_ERROR(result,
81 "Isolate spawn is not supported by this Dart implementation"); 81 "Isolate spawn is not supported by this Dart implementation");
82 EXPECT(Dart_ErrorHasException(result)); 82 EXPECT(Dart_ErrorHasException(result));
83 Dart_Handle exception_result = Dart_ErrorGetException(result); 83 Dart_Handle exception_result = Dart_ErrorGetException(result);
84 EXPECT_VALID(exception_result); 84 EXPECT_VALID(exception_result);
85 } 85 }
86 86
87 87
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Wait for all tasks to observe the interrupt. 144 // Wait for all tasks to observe the interrupt.
145 barrier.Sync(); 145 barrier.Sync();
146 // Continue with next round. 146 // Continue with next round.
147 uword interrupts = isolate->GetAndClearInterrupts(); 147 uword interrupts = isolate->GetAndClearInterrupts();
148 EXPECT((interrupts & Isolate::kVMInterrupt) != 0); 148 EXPECT((interrupts & Isolate::kVMInterrupt) != 0);
149 } 149 }
150 barrier.Exit(); 150 barrier.Exit();
151 } 151 }
152 152
153 } // namespace dart 153 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698