aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsLineIntersectionTest.cpp
diff options
context:
space:
mode:
authorGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-02 21:45:03 +0000
committerGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-02 21:45:03 +0000
commit78e7b4e1b928fa69f672be3c743df6d6c3ecbced (patch)
tree5bc67e556d8a790498b4700d0aa37495c89bfcd5 /tests/PathOpsLineIntersectionTest.cpp
parentdab032a4ba4a93bff49adae064912e4bb6583784 (diff)
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
Diffstat (limited to 'tests/PathOpsLineIntersectionTest.cpp')
-rw-r--r--tests/PathOpsLineIntersectionTest.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/PathOpsLineIntersectionTest.cpp b/tests/PathOpsLineIntersectionTest.cpp
index 9934731f7e..3633262115 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 @@ static void testOneCoincident(skiatest::Reporter* reporter, const SkDLine& line1
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 PathOpsLineIntersectionTest(skiatest::Reporter* reporter) {
}
}
-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)