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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return lib; | 132 return lib; |
133 } | 133 } |
134 | 134 |
135 | 135 |
136 Dart_Handle TestCase::library_handler(Dart_LibraryTag tag, | 136 Dart_Handle TestCase::library_handler(Dart_LibraryTag tag, |
137 Dart_Handle library, | 137 Dart_Handle library, |
138 Dart_Handle url) { | 138 Dart_Handle url) { |
139 if (tag == kCanonicalizeUrl) { | 139 if (tag == kCanonicalizeUrl) { |
140 return url; | 140 return url; |
141 } | 141 } |
142 return Api::Success(Isolate::Current()); | 142 return Api::Success(); |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 void AssemblerTest::Assemble() { | 146 void AssemblerTest::Assemble() { |
147 const String& function_name = String::ZoneHandle(Symbols::New(name_)); | 147 const String& function_name = String::ZoneHandle(Symbols::New(name_)); |
148 const Class& cls = Class::ZoneHandle( | 148 const Class& cls = Class::ZoneHandle( |
149 Class::New(function_name, Script::Handle(), Scanner::kDummyTokenIndex)); | 149 Class::New(function_name, Script::Handle(), Scanner::kDummyTokenIndex)); |
150 Function& function = Function::ZoneHandle( | 150 Function& function = Function::ZoneHandle( |
151 Function::New(function_name, RawFunction::kRegularFunction, | 151 Function::New(function_name, RawFunction::kRegularFunction, |
152 true, false, false, false, cls, 0)); | 152 true, false, false, false, cls, 0)); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 226 |
227 bool CompilerTest::TestCompileFunction(const Function& function) { | 227 bool CompilerTest::TestCompileFunction(const Function& function) { |
228 Isolate* isolate = Isolate::Current(); | 228 Isolate* isolate = Isolate::Current(); |
229 ASSERT(isolate != NULL); | 229 ASSERT(isolate != NULL); |
230 ASSERT(ClassFinalizer::AllClassesFinalized()); | 230 ASSERT(ClassFinalizer::AllClassesFinalized()); |
231 const Error& error = Error::Handle(Compiler::CompileFunction(function)); | 231 const Error& error = Error::Handle(Compiler::CompileFunction(function)); |
232 return error.IsNull(); | 232 return error.IsNull(); |
233 } | 233 } |
234 | 234 |
235 } // namespace dart | 235 } // namespace dart |
OLD | NEW |