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

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

Issue 11040062: Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 13 matching lines...) Expand all
24 static const dart::TestCase kRegister##name(Dart_Test##name, #name); \ 24 static const dart::TestCase kRegister##name(Dart_Test##name, #name); \
25 void Dart_Test##name() 25 void Dart_Test##name()
26 26
27 // The TEST_CASE macro is used for tests that need an isolate and zone 27 // The TEST_CASE macro is used for tests that need an isolate and zone
28 // in order to test its functionality. 28 // in order to test its functionality.
29 #define TEST_CASE(name) \ 29 #define TEST_CASE(name) \
30 static void Dart_TestHelper##name(); \ 30 static void Dart_TestHelper##name(); \
31 UNIT_TEST_CASE(name) \ 31 UNIT_TEST_CASE(name) \
32 { \ 32 { \
33 TestIsolateScope __test_isolate__; \ 33 TestIsolateScope __test_isolate__; \
34 Zone __zone__(__test_isolate__.isolate()); \ 34 StackZone __zone__(__test_isolate__.isolate()); \
35 HandleScope __hs__(__test_isolate__.isolate()); \ 35 HandleScope __hs__(__test_isolate__.isolate()); \
36 Dart_TestHelper##name(); \ 36 Dart_TestHelper##name(); \
37 } \ 37 } \
38 static void Dart_TestHelper##name() 38 static void Dart_TestHelper##name()
39 39
40 // The ASSEMBLER_TEST_GENERATE macro is used to generate a unit test 40 // The ASSEMBLER_TEST_GENERATE macro is used to generate a unit test
41 // for the assembler. 41 // for the assembler.
42 #define ASSEMBLER_TEST_GENERATE(name, assembler) \ 42 #define ASSEMBLER_TEST_GENERATE(name, assembler) \
43 void AssemblerTestGenerate##name(Assembler* assembler) 43 void AssemblerTestGenerate##name(Assembler* assembler)
44 44
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } else { \ 304 } else { \
305 dart::Expect(__FILE__, __LINE__).Fail( \ 305 dart::Expect(__FILE__, __LINE__).Fail( \
306 "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", \
307 #handle); \ 307 #handle); \
308 } \ 308 } \
309 } while (0) 309 } while (0)
310 310
311 } // namespace dart 311 } // namespace dart
312 312
313 #endif // VM_UNIT_TEST_H_ 313 #endif // VM_UNIT_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698