Chromium Code Reviews| 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 #ifndef VM_UNIT_TEST_H_ | 5 #ifndef VM_UNIT_TEST_H_ |
| 6 #define VM_UNIT_TEST_H_ | 6 #define VM_UNIT_TEST_H_ |
| 7 | 7 |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "bin/isolate_data.h" | |
|
Cutch
2016/02/03 23:16:17
This feels icky but I see that unit_test.cc alread
siva
2016/02/03 23:52:04
I have moved the functions to the '.cc' files so t
| |
| 11 | |
| 10 #include "platform/globals.h" | 12 #include "platform/globals.h" |
| 11 | 13 |
| 12 #include "vm/ast.h" | 14 #include "vm/ast.h" |
| 13 #include "vm/dart.h" | 15 #include "vm/dart.h" |
| 14 #include "vm/globals.h" | 16 #include "vm/globals.h" |
| 15 #include "vm/heap.h" | 17 #include "vm/heap.h" |
| 16 #include "vm/isolate.h" | 18 #include "vm/isolate.h" |
| 17 #include "vm/longjump.h" | 19 #include "vm/longjump.h" |
| 18 #include "vm/object.h" | 20 #include "vm/object.h" |
| 19 #include "vm/object_store.h" | 21 #include "vm/object_store.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 static Dart_Handle library_handler(Dart_LibraryTag tag, | 303 static Dart_Handle library_handler(Dart_LibraryTag tag, |
| 302 Dart_Handle library, | 304 Dart_Handle library, |
| 303 Dart_Handle url); | 305 Dart_Handle url); |
| 304 static char* BigintToHexValue(Dart_CObject* bigint); | 306 static char* BigintToHexValue(Dart_CObject* bigint); |
| 305 | 307 |
| 306 virtual void Run(); | 308 virtual void Run(); |
| 307 | 309 |
| 308 private: | 310 private: |
| 309 static Dart_Isolate CreateIsolate(const uint8_t* buffer, | 311 static Dart_Isolate CreateIsolate(const uint8_t* buffer, |
| 310 const char* name) { | 312 const char* name) { |
| 313 bin::IsolateData* isolate_data = new bin::IsolateData(name, NULL, NULL); | |
| 311 char* err; | 314 char* err; |
| 312 Dart_Isolate isolate = Dart_CreateIsolate( | 315 Dart_Isolate isolate = Dart_CreateIsolate( |
| 313 name, NULL, buffer, NULL, NULL, &err); | 316 name, NULL, buffer, NULL, isolate_data, &err); |
| 314 if (isolate == NULL) { | 317 if (isolate == NULL) { |
| 315 OS::Print("Creation of isolate failed '%s'\n", err); | 318 OS::Print("Creation of isolate failed '%s'\n", err); |
| 316 free(err); | 319 free(err); |
| 317 } | 320 } |
| 318 EXPECT(isolate != NULL); | 321 EXPECT(isolate != NULL); |
| 319 return isolate; | 322 return isolate; |
| 320 } | 323 } |
| 321 | 324 |
| 322 RunEntry* const run_; | 325 RunEntry* const run_; |
| 323 }; | 326 }; |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 // Yields: | 573 // Yields: |
| 571 // | 574 // |
| 572 // out = "\"id\":\"\"" | 575 // out = "\"id\":\"\"" |
| 573 // | 576 // |
| 574 void ElideJSONSubstring(const char* prefix, const char* in, char* out); | 577 void ElideJSONSubstring(const char* prefix, const char* in, char* out); |
| 575 | 578 |
| 576 | 579 |
| 577 } // namespace dart | 580 } // namespace dart |
| 578 | 581 |
| 579 #endif // VM_UNIT_TEST_H_ | 582 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |