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

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

Issue 10407042: spawnUri. Take two. This time I'll wait for Anton before committing :-). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_UNIT_TEST_H_ 5 #ifndef VM_UNIT_TEST_H_
6 #define VM_UNIT_TEST_H_ 6 #define VM_UNIT_TEST_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "vm/ast.h" 10 #include "vm/ast.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 static Dart_Handle lib(); 174 static Dart_Handle lib();
175 static const char* url() { return "dart:test-lib"; } 175 static const char* url() { return "dart:test-lib"; }
176 static Dart_Isolate CreateTestIsolateFromSnapshot(uint8_t* buffer) { 176 static Dart_Isolate CreateTestIsolateFromSnapshot(uint8_t* buffer) {
177 return CreateIsolate(buffer); 177 return CreateIsolate(buffer);
178 } 178 }
179 static Dart_Isolate CreateTestIsolate() { 179 static Dart_Isolate CreateTestIsolate() {
180 return CreateIsolate(NULL); 180 return CreateIsolate(NULL);
181 } 181 }
182 static Dart_Handle library_handler(Dart_LibraryTag tag, 182 static Dart_Handle library_handler(Dart_LibraryTag tag,
183 Dart_Handle library, 183 Dart_Handle library,
184 Dart_Handle url, 184 Dart_Handle url);
185 Dart_Handle import_map);
186 185
187 virtual void Run(); 186 virtual void Run();
188 187
189 private: 188 private:
190 static Dart_Isolate CreateIsolate(uint8_t* buffer) { 189 static Dart_Isolate CreateIsolate(uint8_t* buffer) {
191 char* err; 190 char* err;
192 Dart_Isolate isolate = Dart_CreateIsolate(NULL, buffer, NULL, &err); 191 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err);
193 if (isolate == NULL) { 192 if (isolate == NULL) {
194 OS::Print("Creation of isolate failed '%s'\n", err); 193 OS::Print("Creation of isolate failed '%s'\n", err);
195 free(err); 194 free(err);
196 } 195 }
197 EXPECT(isolate != NULL); 196 EXPECT(isolate != NULL);
198 return isolate; 197 return isolate;
199 } 198 }
200 199
201 RunEntry* const run_; 200 RunEntry* const run_;
202 }; 201 };
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } else { \ 304 } else { \
306 dart::Expect(__FILE__, __LINE__).Fail( \ 305 dart::Expect(__FILE__, __LINE__).Fail( \
307 "expected '%s' to be an error handle but found a valid handle.\n", \ 306 "expected '%s' to be an error handle but found a valid handle.\n", \
308 #handle); \ 307 #handle); \
309 } \ 308 } \
310 } while (0) 309 } while (0)
311 310
312 } // namespace dart 311 } // namespace dart
313 312
314 #endif // VM_UNIT_TEST_H_ 313 #endif // VM_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698