Chromium Code Reviews| 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_ |