| OLD | NEW |
| 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 "vm/unit_test.h" | 5 #include "vm/unit_test.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
| 10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 Dart_Handle TestCase::LoadTestScript(const char* script, | 114 Dart_Handle TestCase::LoadTestScript(const char* script, |
| 115 Dart_NativeEntryResolver resolver) { | 115 Dart_NativeEntryResolver resolver) { |
| 116 Dart_Handle url = NewString(TestCase::url()); | 116 Dart_Handle url = NewString(TestCase::url()); |
| 117 Dart_Handle source = NewString(script); | 117 Dart_Handle source = NewString(script); |
| 118 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); | 118 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); |
| 119 EXPECT_VALID(result); | 119 EXPECT_VALID(result); |
| 120 EXPECT_VALID(result); | 120 EXPECT_VALID(result); |
| 121 Dart_Handle lib = Dart_LoadScript(url, source, 0, 0); | 121 Dart_Handle lib = Dart_LoadScript(url, source, 0, 0); |
| 122 DART_CHECK_VALID(lib); | 122 DART_CHECK_VALID(lib); |
| 123 result = Dart_SetNativeResolver(lib, resolver); | 123 result = Dart_SetNativeResolver(lib, resolver, NULL); |
| 124 DART_CHECK_VALID(result); | 124 DART_CHECK_VALID(result); |
| 125 return lib; | 125 return lib; |
| 126 } | 126 } |
| 127 | 127 |
| 128 | 128 |
| 129 Dart_Handle TestCase::lib() { | 129 Dart_Handle TestCase::lib() { |
| 130 Dart_Handle url = NewString(TestCase::url()); | 130 Dart_Handle url = NewString(TestCase::url()); |
| 131 Dart_Handle lib = Dart_LookupLibrary(url); | 131 Dart_Handle lib = Dart_LookupLibrary(url); |
| 132 DART_CHECK_VALID(lib); | 132 DART_CHECK_VALID(lib); |
| 133 ASSERT(Dart_IsLibrary(lib)); | 133 ASSERT(Dart_IsLibrary(lib)); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 Isolate* isolate = Isolate::Current(); | 235 Isolate* isolate = Isolate::Current(); |
| 236 ASSERT(isolate != NULL); | 236 ASSERT(isolate != NULL); |
| 237 ASSERT(ClassFinalizer::AllClassesFinalized()); | 237 ASSERT(ClassFinalizer::AllClassesFinalized()); |
| 238 const Error& error = Error::Handle(Compiler::CompileFunction(function)); | 238 const Error& error = Error::Handle(Compiler::CompileFunction(function)); |
| 239 return error.IsNull(); | 239 return error.IsNull(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 #endif // !defined(TARGET_ARCH_ARM64) | 242 #endif // !defined(TARGET_ARCH_ARM64) |
| 243 | 243 |
| 244 } // namespace dart | 244 } // namespace dart |
| OLD | NEW |