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

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

Issue 9242035: Give isolates names to be used during debugging. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 static Dart_Handle library_handler(Dart_LibraryTag tag, 171 static Dart_Handle library_handler(Dart_LibraryTag tag,
172 Dart_Handle library, 172 Dart_Handle library,
173 Dart_Handle url); 173 Dart_Handle url);
174 174
175 virtual void Run(); 175 virtual void Run();
176 176
177 private: 177 private:
178 static Dart_Isolate CreateIsolate(uint8_t* buffer) { 178 static Dart_Isolate CreateIsolate(uint8_t* buffer) {
179 char* err; 179 char* err;
180 Dart_Isolate isolate = Dart_CreateIsolate(buffer, NULL, &err); 180 Dart_Isolate isolate = Dart_CreateIsolate(NULL, buffer, NULL, &err);
181 if (isolate == NULL) { 181 if (isolate == NULL) {
182 OS::Print("Creation of isolate failed '%s'\n", err); 182 OS::Print("Creation of isolate failed '%s'\n", err);
183 free(err); 183 free(err);
184 } 184 }
185 EXPECT(isolate != NULL); 185 EXPECT(isolate != NULL);
186 return isolate; 186 return isolate;
187 } 187 }
188 188
189 RunEntry* const run_; 189 RunEntry* const run_;
190 }; 190 };
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 #define EXPECT_VALID(handle) \ 274 #define EXPECT_VALID(handle) \
275 if (Dart_IsError((handle))) { \ 275 if (Dart_IsError((handle))) { \
276 dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \ 276 dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \
277 #handle, Dart_GetError(handle)); \ 277 #handle, Dart_GetError(handle)); \
278 } 278 }
279 279
280 } // namespace dart 280 } // namespace dart
281 281
282 #endif // VM_UNIT_TEST_H_ 282 #endif // VM_UNIT_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698