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

Side by Side Diff: vm/unit_test.cc

Issue 10302020: Fix issue 2888. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « vm/dart_api_impl_test.cc ('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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 return result; 101 return result;
102 } 102 }
103 103
104 104
105 Dart_Handle TestCase::LoadTestScript(const char* script, 105 Dart_Handle TestCase::LoadTestScript(const char* script,
106 Dart_NativeEntryResolver resolver, 106 Dart_NativeEntryResolver resolver,
107 Dart_Handle import_map) { 107 Dart_Handle import_map) {
108 Dart_Handle url = Dart_NewString(TestCase::url()); 108 Dart_Handle url = Dart_NewString(TestCase::url());
109 Dart_Handle source = Dart_NewString(script); 109 Dart_Handle source = Dart_NewString(script);
110 Dart_Handle lib = Dart_LoadScript(url, source, LibraryTagHandler, import_map); 110 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler);
111 EXPECT_VALID(result);
112 Dart_Handle lib = Dart_LoadScript(url, source, import_map);
111 DART_CHECK_VALID(lib); 113 DART_CHECK_VALID(lib);
112 Dart_Handle result = Dart_SetNativeResolver(lib, resolver); 114 result = Dart_SetNativeResolver(lib, resolver);
113 DART_CHECK_VALID(result); 115 DART_CHECK_VALID(result);
114 return lib; 116 return lib;
115 } 117 }
116 118
117 119
118 Dart_Handle TestCase::lib() { 120 Dart_Handle TestCase::lib() {
119 Dart_Handle url = Dart_NewString(TestCase::url()); 121 Dart_Handle url = Dart_NewString(TestCase::url());
120 Dart_Handle lib = Dart_LookupLibrary(url); 122 Dart_Handle lib = Dart_LookupLibrary(url);
121 DART_CHECK_VALID(lib); 123 DART_CHECK_VALID(lib);
122 ASSERT(Dart_IsLibrary(lib)); 124 ASSERT(Dart_IsLibrary(lib));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 223
222 bool CompilerTest::TestCompileFunction(const Function& function) { 224 bool CompilerTest::TestCompileFunction(const Function& function) {
223 Isolate* isolate = Isolate::Current(); 225 Isolate* isolate = Isolate::Current();
224 ASSERT(isolate != NULL); 226 ASSERT(isolate != NULL);
225 ASSERT(ClassFinalizer::AllClassesFinalized()); 227 ASSERT(ClassFinalizer::AllClassesFinalized());
226 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 228 const Error& error = Error::Handle(Compiler::CompileFunction(function));
227 return error.IsNull(); 229 return error.IsNull();
228 } 230 }
229 231
230 } // namespace dart 232 } // namespace dart
OLDNEW
« no previous file with comments | « vm/dart_api_impl_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698