| 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 <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
| 8 | 8 |
| 9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
| 10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 | 94 |
| 95 Dart_Handle TestCase::LoadTestScript(const char* script, | 95 Dart_Handle TestCase::LoadTestScript(const char* script, |
| 96 Dart_NativeEntryResolver resolver) { | 96 Dart_NativeEntryResolver resolver) { |
| 97 Dart_Handle url = NewString(TestCase::url()); | 97 Dart_Handle url = NewString(TestCase::url()); |
| 98 Dart_Handle source = NewString(script); | 98 Dart_Handle source = NewString(script); |
| 99 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); | 99 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); |
| 100 EXPECT_VALID(result); | 100 EXPECT_VALID(result); |
| 101 EXPECT_VALID(result); | 101 EXPECT_VALID(result); |
| 102 Dart_Handle lib = Dart_LoadScript(url, source); | 102 Dart_Handle lib = Dart_LoadScript(url, source, 0, 0); |
| 103 DART_CHECK_VALID(lib); | 103 DART_CHECK_VALID(lib); |
| 104 result = Dart_SetNativeResolver(lib, resolver); | 104 result = Dart_SetNativeResolver(lib, resolver); |
| 105 DART_CHECK_VALID(result); | 105 DART_CHECK_VALID(result); |
| 106 return lib; | 106 return lib; |
| 107 } | 107 } |
| 108 | 108 |
| 109 | 109 |
| 110 Dart_Handle TestCase::lib() { | 110 Dart_Handle TestCase::lib() { |
| 111 Dart_Handle url = NewString(TestCase::url()); | 111 Dart_Handle url = NewString(TestCase::url()); |
| 112 Dart_Handle lib = Dart_LookupLibrary(url); | 112 Dart_Handle lib = Dart_LookupLibrary(url); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 bool CompilerTest::TestCompileFunction(const Function& function) { | 210 bool CompilerTest::TestCompileFunction(const Function& function) { |
| 211 Isolate* isolate = Isolate::Current(); | 211 Isolate* isolate = Isolate::Current(); |
| 212 ASSERT(isolate != NULL); | 212 ASSERT(isolate != NULL); |
| 213 ASSERT(ClassFinalizer::AllClassesFinalized()); | 213 ASSERT(ClassFinalizer::AllClassesFinalized()); |
| 214 const Error& error = Error::Handle(Compiler::CompileFunction(function)); | 214 const Error& error = Error::Handle(Compiler::CompileFunction(function)); |
| 215 return error.IsNull(); | 215 return error.IsNull(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace dart | 218 } // namespace dart |
| OLD | NEW |