Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: runtime/vm/unit_test.cc

Issue 10868043: Move print to corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make it pass all tests. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« runtime/vm/unit_test.h ('K') | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } else if (DartUtils::IsDartUtfLibURL(url_chars)) { 84 } else if (DartUtils::IsDartUtfLibURL(url_chars)) {
85 return Builtin::LoadLibrary(Builtin::kUtfLibrary); 85 return Builtin::LoadLibrary(Builtin::kUtfLibrary);
86 } else if (DartUtils::IsDartCryptoLibURL(url_chars)) { 86 } else if (DartUtils::IsDartCryptoLibURL(url_chars)) {
87 return Builtin::LoadLibrary(Builtin::kCryptoLibrary); 87 return Builtin::LoadLibrary(Builtin::kCryptoLibrary);
88 } else if (DartUtils::IsDartWebLibURL(url_chars)) { 88 } else if (DartUtils::IsDartWebLibURL(url_chars)) {
89 return Builtin::LoadLibrary(Builtin::kWebLibrary); 89 return Builtin::LoadLibrary(Builtin::kWebLibrary);
90 } else { 90 } else {
91 return Dart_Error("Do not know how to load '%s'", url_chars); 91 return Dart_Error("Do not know how to load '%s'", url_chars);
92 } 92 }
93 } 93 }
94 result = DartUtils::LoadSource(NULL, 94 return DartUtils::LoadSource(NULL,
95 library, 95 library,
96 url, 96 url,
97 tag, 97 tag,
98 url_chars); 98 url_chars);
99 if (!Dart_IsError(result) && (tag == kImportTag)) {
100 Builtin::ImportLibrary(result, Builtin::kBuiltinLibrary);
101 }
102 return result;
103 } 99 }
104 100
105 101
106 Dart_Handle TestCase::LoadTestScript(const char* script, 102 Dart_Handle TestCase::LoadTestScript(const char* script,
107 Dart_NativeEntryResolver resolver, 103 Dart_NativeEntryResolver resolver,
108 Dart_Handle import_map) { 104 Dart_Handle import_map) {
109 Dart_Handle url = Dart_NewString(TestCase::url()); 105 Dart_Handle url = Dart_NewString(TestCase::url());
110 Dart_Handle source = Dart_NewString(script); 106 Dart_Handle source = Dart_NewString(script);
111 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); 107 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler);
112 EXPECT_VALID(result); 108 EXPECT_VALID(result);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 218
223 bool CompilerTest::TestCompileFunction(const Function& function) { 219 bool CompilerTest::TestCompileFunction(const Function& function) {
224 Isolate* isolate = Isolate::Current(); 220 Isolate* isolate = Isolate::Current();
225 ASSERT(isolate != NULL); 221 ASSERT(isolate != NULL);
226 ASSERT(ClassFinalizer::AllClassesFinalized()); 222 ASSERT(ClassFinalizer::AllClassesFinalized());
227 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 223 const Error& error = Error::Handle(Compiler::CompileFunction(function));
228 return error.IsNull(); 224 return error.IsNull();
229 } 225 }
230 226
231 } // namespace dart 227 } // namespace dart
OLDNEW
« runtime/vm/unit_test.h ('K') | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698