| 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_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| 11 | 11 |
| 12 #include "vm/ast.h" | 12 #include "vm/ast.h" |
| 13 #include "vm/dart.h" | 13 #include "vm/dart.h" |
| 14 #include "vm/globals.h" | 14 #include "vm/globals.h" |
| 15 #include "vm/heap.h" | 15 #include "vm/heap.h" |
| 16 #include "vm/isolate.h" | 16 #include "vm/isolate.h" |
| 17 #include "vm/longjump.h" | 17 #include "vm/longjump.h" |
| 18 #include "vm/object.h" | 18 #include "vm/object.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 static const char* url() { return USER_TEST_URI; } | 254 static const char* url() { return USER_TEST_URI; } |
| 255 static Dart_Isolate CreateTestIsolateFromSnapshot(uint8_t* buffer) { | 255 static Dart_Isolate CreateTestIsolateFromSnapshot(uint8_t* buffer) { |
| 256 return CreateIsolate(buffer); | 256 return CreateIsolate(buffer); |
| 257 } | 257 } |
| 258 static Dart_Isolate CreateTestIsolate() { | 258 static Dart_Isolate CreateTestIsolate() { |
| 259 return CreateIsolate(bin::snapshot_buffer); | 259 return CreateIsolate(bin::snapshot_buffer); |
| 260 } | 260 } |
| 261 static Dart_Handle library_handler(Dart_LibraryTag tag, | 261 static Dart_Handle library_handler(Dart_LibraryTag tag, |
| 262 Dart_Handle library, | 262 Dart_Handle library, |
| 263 Dart_Handle url); | 263 Dart_Handle url); |
| 264 static char* BigintToHexValue(Dart_CObject* bigint); |
| 264 | 265 |
| 265 virtual void Run(); | 266 virtual void Run(); |
| 266 | 267 |
| 267 private: | 268 private: |
| 268 static Dart_Isolate CreateIsolate(const uint8_t* buffer) { | 269 static Dart_Isolate CreateIsolate(const uint8_t* buffer) { |
| 269 char* err; | 270 char* err; |
| 270 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err); | 271 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err); |
| 271 if (isolate == NULL) { | 272 if (isolate == NULL) { |
| 272 OS::Print("Creation of isolate failed '%s'\n", err); | 273 OS::Print("Creation of isolate failed '%s'\n", err); |
| 273 free(err); | 274 free(err); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 } \ | 407 } \ |
| 407 } else { \ | 408 } else { \ |
| 408 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ | 409 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ |
| 409 #handle); \ | 410 #handle); \ |
| 410 } \ | 411 } \ |
| 411 } while (0) | 412 } while (0) |
| 412 | 413 |
| 413 } // namespace dart | 414 } // namespace dart |
| 414 | 415 |
| 415 #endif // VM_UNIT_TEST_H_ | 416 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |