Get rid of DEFINE_TESTCLASS_SHORT() macro.
Instead tests should be written using DEF_TEST() macro, which is much
nicer and simplifies the process of setting up an unit test.
BUG=None
TEST=skpskgr_test, pathops_unittest
R=mtklein@google.com
Review URL: https://codereview.chromium.org/117863005
git-svn-id: http://skia.googlecode.com/svn/trunk@12870 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathOpsLineIntersectionTest.cpp b/tests/PathOpsLineIntersectionTest.cpp
index 9934731..3633262 100644
--- a/tests/PathOpsLineIntersectionTest.cpp
+++ b/tests/PathOpsLineIntersectionTest.cpp
@@ -8,6 +8,7 @@
#include "SkIntersections.h"
#include "SkPathOpsLine.h"
#include "Test.h"
+#include "TestClassDef.h"
// FIXME: add tests for intersecting, non-intersecting, degenerate, coincident
static const SkDLine tests[][2] = {
@@ -178,7 +179,7 @@
reporter->bumpTestCount();
}
-static void PathOpsLineIntersectionTest(skiatest::Reporter* reporter) {
+DEF_TEST(PathOpsLineIntersection, reporter) {
size_t index;
for (index = 0; index < coincidentTests_count; ++index) {
const SkDLine& line1 = coincidentTests[index][0];
@@ -201,24 +202,17 @@
}
}
-static void PathOpsLineIntersectionOneOffTest(skiatest::Reporter* reporter) {
+DEF_TEST(PathOpsLineIntersectionOneOff, reporter) {
int index = 0;
SkASSERT(index < (int) tests_count);
testOne(reporter, tests[index][0], tests[index][1]);
testOne(reporter, tests[1][0], tests[1][1]);
}
-static void PathOpsLineIntersectionOneCoincidentTest(skiatest::Reporter* reporter) {
+DEF_TEST(PathOpsLineIntersectionOneCoincident, reporter) {
int index = 0;
SkASSERT(index < (int) coincidentTests_count);
const SkDLine& line1 = coincidentTests[index][0];
const SkDLine& line2 = coincidentTests[index][1];
testOneCoincident(reporter, line1, line2);
}
-
-#include "TestClassDef.h"
-DEFINE_TESTCLASS_SHORT(PathOpsLineIntersectionTest)
-
-DEFINE_TESTCLASS_SHORT(PathOpsLineIntersectionOneOffTest)
-
-DEFINE_TESTCLASS_SHORT(PathOpsLineIntersectionOneCoincidentTest)