Index: tests/TestClassDef.h |
diff --git a/tests/TestClassDef.h b/tests/TestClassDef.h |
index 70d6039c16f38654293e569ed64645f722eaaab1..89124c78faa8b8f063975f52e1b32fbc2cf91195 100644 |
--- a/tests/TestClassDef.h |
+++ b/tests/TestClassDef.h |
@@ -55,3 +55,15 @@ |
}; \ |
static TestRegistry gReg_##classname(classname::Factory); \ |
} |
+ |
+ |
+// Yet shorter way to define a test. E.g. |
+// |
+// DEF_TEST(some_test_name, r) { |
+// ... |
+// REPORTER_ASSERT(r, x == 15); |
+// } |
+#define DEF_TEST(name, reporter) \ |
+ static void name(skiatest::Reporter* reporter); \ |
+ DEFINE_TESTCLASS_SHORT(name) \ |
+ static void name(skiatest::Reporter* reporter) |