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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.h
===================================================================
--- runtime/vm/unit_test.h (revision 969)
+++ runtime/vm/unit_test.h (working copy)
@@ -249,6 +249,12 @@
static bool TestCompileFunction(const Function& function);
};
+#define EXPECT_VALID(handle) \
+ if (!Dart_IsValid((handle))) { \
+ dart::Expect(__FILE__, __LINE__).Fail("invalid handle '%s':\n '%s'\n", \
+ #handle, Dart_GetError(handle)); \
+ }
+
} // namespace dart
#endif // VM_UNIT_TEST_H_
« 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