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

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

Issue 867113003: Revert r43217, r43215, r43208, r43207, and r43202. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/service/vmservice.dart ('k') | tests/standalone/vmservice/test_helper.dart » ('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_native_api.h" 8 #include "include/dart_native_api.h"
9 9
10 #include "platform/globals.h" 10 #include "platform/globals.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 static Dart_Handle LoadTestScript(const char* script, 258 static Dart_Handle LoadTestScript(const char* script,
259 Dart_NativeEntryResolver resolver, 259 Dart_NativeEntryResolver resolver,
260 const char* lib_uri = USER_TEST_URI, 260 const char* lib_uri = USER_TEST_URI,
261 bool finalize = true); 261 bool finalize = true);
262 262
263 static Dart_Handle LoadCoreTestScript(const char* script, 263 static Dart_Handle LoadCoreTestScript(const char* script,
264 Dart_NativeEntryResolver resolver); 264 Dart_NativeEntryResolver resolver);
265 static Dart_Handle lib(); 265 static Dart_Handle lib();
266 static const char* url() { return USER_TEST_URI; } 266 static const char* url() { return USER_TEST_URI; }
267 static Dart_Isolate CreateTestIsolateFromSnapshot( 267 static Dart_Isolate CreateTestIsolateFromSnapshot(uint8_t* buffer) {
268 uint8_t* buffer, const char* name = NULL) { 268 return CreateIsolate(buffer);
269 return CreateIsolate(buffer, name);
270 } 269 }
271 static Dart_Isolate CreateTestIsolate(const char* name = NULL) { 270 static Dart_Isolate CreateTestIsolate() {
272 return CreateIsolate(bin::snapshot_buffer, name); 271 return CreateIsolate(bin::snapshot_buffer);
273 } 272 }
274 static Dart_Handle library_handler(Dart_LibraryTag tag, 273 static Dart_Handle library_handler(Dart_LibraryTag tag,
275 Dart_Handle library, 274 Dart_Handle library,
276 Dart_Handle url); 275 Dart_Handle url);
277 static char* BigintToHexValue(Dart_CObject* bigint); 276 static char* BigintToHexValue(Dart_CObject* bigint);
278 277
279 virtual void Run(); 278 virtual void Run();
280 279
281 private: 280 private:
282 static Dart_Isolate CreateIsolate(const uint8_t* buffer, 281 static Dart_Isolate CreateIsolate(const uint8_t* buffer) {
283 const char* name) {
284 char* err; 282 char* err;
285 Dart_Isolate isolate = Dart_CreateIsolate(name, NULL, buffer, NULL, &err); 283 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err);
286 if (isolate == NULL) { 284 if (isolate == NULL) {
287 OS::Print("Creation of isolate failed '%s'\n", err); 285 OS::Print("Creation of isolate failed '%s'\n", err);
288 free(err); 286 free(err);
289 } 287 }
290 EXPECT(isolate != NULL); 288 EXPECT(isolate != NULL);
291 return isolate; 289 return isolate;
292 } 290 }
293 291
294 RunEntry* const run_; 292 RunEntry* const run_;
295 }; 293 };
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } \ 417 } \
420 } else { \ 418 } else { \
421 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ 419 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \
422 #handle); \ 420 #handle); \
423 } \ 421 } \
424 } while (0) 422 } while (0)
425 423
426 } // namespace dart 424 } // namespace dart
427 425
428 #endif // VM_UNIT_TEST_H_ 426 #endif // VM_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « runtime/vm/service/vmservice.dart ('k') | tests/standalone/vmservice/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698