aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsAngleTest.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/PathOpsAngleTest.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/PathOpsAngleTest.cpp')
-rw-r--r--tests/PathOpsAngleTest.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp
index e1fb038a24..f326a90cc4 100644
--- a/tests/PathOpsAngleTest.cpp
+++ b/tests/PathOpsAngleTest.cpp
@@ -8,6 +8,7 @@
#include "SkOpSegment.h"
#include "SkTArray.h"
#include "Test.h"
+#include "TestClassDef.h"
static const SkPoint cubics[][4] = {
/* 0 */ {{0, 1}, {2, 6}, {4, 2}, {5, 3}},
@@ -391,7 +392,7 @@ static void testOne(skiatest::Reporter* reporter, const SortSetTests& test) {
}
}
-static void PathOpsAngleTest(skiatest::Reporter* reporter) {
+DEF_TEST(PathOpsAngle, reporter) {
for (size_t index = 0; index < SK_ARRAY_COUNT(tests); ++index) {
const SortSetTests& test = tests[index];
testOne(reporter, test);
@@ -399,7 +400,7 @@ static void PathOpsAngleTest(skiatest::Reporter* reporter) {
}
}
-static void PathOpsAngleTestOne(skiatest::Reporter* reporter) {
+DEF_TEST(PathOpsAngleTestOne, reporter) {
size_t index = 0;
const SortSetTests& test = tests[index];
testOne(reporter, test);
@@ -451,7 +452,7 @@ static const double slopTests[][4] = {
{-2.1033774145221198, -1.4046019261273715e-008, -0.70062688352066704, -1.2706324683777995e-008},
};
-static void PathOpsAngleFindSlop(skiatest::Reporter* reporter) {
+/*DEF_TEST(PathOpsAngleFindSlop, reporter) {
for (size_t index = 0; index < SK_ARRAY_COUNT(slopTests); ++index) {
const double* slopTest = slopTests[index];
double x = slopTest[0];
@@ -467,12 +468,5 @@ static void PathOpsAngleFindSlop(skiatest::Reporter* reporter) {
angle, rAngle, diff, (int) (diff / FLT_EPSILON));
}
-}
+}*/
#endif
-
-#include "TestClassDef.h"
-DEFINE_TESTCLASS_SHORT(PathOpsAngleTest)
-
-DEFINE_TESTCLASS_SHORT(PathOpsAngleTestOne)
-
-// DEFINE_TESTCLASS_SHORT(PathOpsAngleFindSlop)