| 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 "platform/globals.h" | 10 #include "platform/globals.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // Sets |script| to be the source used at next reload. | 307 // Sets |script| to be the source used at next reload. |
| 308 static void SetReloadTestScript(const char* script); | 308 static void SetReloadTestScript(const char* script); |
| 309 // Initiates the reload. | 309 // Initiates the reload. |
| 310 static Dart_Handle TriggerReload(); | 310 static Dart_Handle TriggerReload(); |
| 311 // Gets the result of a reload. | 311 // Gets the result of a reload. |
| 312 static Dart_Handle GetReloadErrorOrRootLibrary(); | 312 static Dart_Handle GetReloadErrorOrRootLibrary(); |
| 313 | 313 |
| 314 // Helper function which reloads the current isolate using |script|. | 314 // Helper function which reloads the current isolate using |script|. |
| 315 static Dart_Handle ReloadTestScript(const char* script); | 315 static Dart_Handle ReloadTestScript(const char* script); |
| 316 | 316 |
| 317 // Changes the default importable test lib script. |
| 318 static void SetImportableTestLibScript(const char* source); |
| 319 static void RestoreImportableTestLibScript(); |
| 320 |
| 317 private: | 321 private: |
| 318 static Dart_Isolate CreateIsolate(const uint8_t* buffer, const char* name); | 322 static Dart_Isolate CreateIsolate(const uint8_t* buffer, const char* name); |
| 319 | 323 |
| 320 RunEntry* const run_; | 324 RunEntry* const run_; |
| 321 }; | 325 }; |
| 322 | 326 |
| 323 | 327 |
| 324 class TestIsolateScope { | 328 class TestIsolateScope { |
| 325 public: | 329 public: |
| 326 TestIsolateScope() { | 330 TestIsolateScope() { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 } | 613 } |
| 610 | 614 |
| 611 private: | 615 private: |
| 612 T* flag_; | 616 T* flag_; |
| 613 T original_value_; | 617 T original_value_; |
| 614 }; | 618 }; |
| 615 | 619 |
| 616 } // namespace dart | 620 } // namespace dart |
| 617 | 621 |
| 618 #endif // VM_UNIT_TEST_H_ | 622 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |