| 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. | 317 static void AddTestLib(const char* url, const char* source); |
| 318 static void SetImportableTestLibScript(const char* source); | 318 static const char* GetTestLib(const char* url); |
| 319 static void RestoreImportableTestLibScript(); | |
| 320 | 319 |
| 321 private: | 320 private: |
| 322 static Dart_Isolate CreateIsolate(const uint8_t* buffer, const char* name); | 321 static Dart_Isolate CreateIsolate(const uint8_t* buffer, const char* name); |
| 323 | 322 |
| 324 RunEntry* const run_; | 323 RunEntry* const run_; |
| 325 }; | 324 }; |
| 326 | 325 |
| 327 | 326 |
| 328 class TestIsolateScope { | 327 class TestIsolateScope { |
| 329 public: | 328 public: |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 } | 612 } |
| 614 | 613 |
| 615 private: | 614 private: |
| 616 T* flag_; | 615 T* flag_; |
| 617 T original_value_; | 616 T original_value_; |
| 618 }; | 617 }; |
| 619 | 618 |
| 620 } // namespace dart | 619 } // namespace dart |
| 621 | 620 |
| 622 #endif // VM_UNIT_TEST_H_ | 621 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |