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

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

Issue 227433004: Add runtime and native entry tags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698