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

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

Issue 10332257: Revert my last change. (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);
185 186
186 virtual void Run(); 187 virtual void Run();
187 188
188 private: 189 private:
189 static Dart_Isolate CreateIsolate(uint8_t* buffer) { 190 static Dart_Isolate CreateIsolate(uint8_t* buffer) {
190 char* err; 191 char* err;
191 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err); 192 Dart_Isolate isolate = Dart_CreateIsolate(NULL, buffer, NULL, &err);
192 if (isolate == NULL) { 193 if (isolate == NULL) {
193 OS::Print("Creation of isolate failed '%s'\n", err); 194 OS::Print("Creation of isolate failed '%s'\n", err);
194 free(err); 195 free(err);
195 } 196 }
196 EXPECT(isolate != NULL); 197 EXPECT(isolate != NULL);
197 return isolate; 198 return isolate;
198 } 199 }
199 200
200 RunEntry* const run_; 201 RunEntry* const run_;
201 }; 202 };
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } else { \ 305 } else { \
305 dart::Expect(__FILE__, __LINE__).Fail( \ 306 dart::Expect(__FILE__, __LINE__).Fail( \
306 "expected '%s' to be an error handle but found a valid handle.\n", \ 307 "expected '%s' to be an error handle but found a valid handle.\n", \
307 #handle); \ 308 #handle); \
308 } \ 309 } \
309 } while (0) 310 } while (0)
310 311
311 } // namespace dart 312 } // namespace dart
312 313
313 #endif // VM_UNIT_TEST_H_ 314 #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