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

Side by Side Diff: vm/unit_test.cc

Issue 10911025: Get rid of support for string interpolation in #import strings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: 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
« no previous file with comments | « 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 return 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 } 99 }
100 100
101 101
102 Dart_Handle TestCase::LoadTestScript(const char* script, 102 Dart_Handle TestCase::LoadTestScript(const char* script,
103 Dart_NativeEntryResolver resolver, 103 Dart_NativeEntryResolver resolver) {
104 Dart_Handle import_map) {
105 Dart_Handle url = Dart_NewString(TestCase::url()); 104 Dart_Handle url = Dart_NewString(TestCase::url());
106 Dart_Handle source = Dart_NewString(script); 105 Dart_Handle source = Dart_NewString(script);
107 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); 106 Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler);
108 EXPECT_VALID(result); 107 EXPECT_VALID(result);
109 result = Dart_SetImportMap(import_map);
110 EXPECT_VALID(result); 108 EXPECT_VALID(result);
111 Dart_Handle lib = Dart_LoadScript(url, source); 109 Dart_Handle lib = Dart_LoadScript(url, source);
112 DART_CHECK_VALID(lib); 110 DART_CHECK_VALID(lib);
113 result = Dart_SetNativeResolver(lib, resolver); 111 result = Dart_SetNativeResolver(lib, resolver);
114 DART_CHECK_VALID(result); 112 DART_CHECK_VALID(result);
115 return lib; 113 return lib;
116 } 114 }
117 115
118 116
119 Dart_Handle TestCase::lib() { 117 Dart_Handle TestCase::lib() {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 216
219 bool CompilerTest::TestCompileFunction(const Function& function) { 217 bool CompilerTest::TestCompileFunction(const Function& function) {
220 Isolate* isolate = Isolate::Current(); 218 Isolate* isolate = Isolate::Current();
221 ASSERT(isolate != NULL); 219 ASSERT(isolate != NULL);
222 ASSERT(ClassFinalizer::AllClassesFinalized()); 220 ASSERT(ClassFinalizer::AllClassesFinalized());
223 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 221 const Error& error = Error::Handle(Compiler::CompileFunction(function));
224 return error.IsNull(); 222 return error.IsNull();
225 } 223 }
226 224
227 } // namespace dart 225 } // namespace dart
OLDNEW
« no previous file with comments | « vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698