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

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

Issue 8401010: Add DART_CHECKVALID (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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') | no next file » | 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 public: 242 public:
243 // Test the Compiler::CompileScript functionality by checking the return 243 // Test the Compiler::CompileScript functionality by checking the return
244 // value to see if no parse errors were reported. 244 // value to see if no parse errors were reported.
245 static bool TestCompileScript(const Library& library, const Script& script); 245 static bool TestCompileScript(const Library& library, const Script& script);
246 246
247 // Test the Compiler::CompileFunction functionality by checking the return 247 // Test the Compiler::CompileFunction functionality by checking the return
248 // value to see if no parse errors were reported. 248 // value to see if no parse errors were reported.
249 static bool TestCompileFunction(const Function& function); 249 static bool TestCompileFunction(const Function& function);
250 }; 250 };
251 251
252 #define EXPECT_VALID(handle) \
253 if (!Dart_IsValid((handle))) { \
254 dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \
255 #handle, Dart_GetError(handle)); \
256 }
257
252 } // namespace dart 258 } // namespace dart
253 259
254 #endif // VM_UNIT_TEST_H_ 260 #endif // VM_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698