Index: tests/ClampRangeTest.cpp |
diff --git a/tests/ClampRangeTest.cpp b/tests/ClampRangeTest.cpp |
index 1d6bcd21ff1e36fcfdfd6669abcd437673bb676c..a9a59acb6ac0b734bd4eafabe759306ba19f0f17 100644 |
--- a/tests/ClampRangeTest.cpp |
+++ b/tests/ClampRangeTest.cpp |
@@ -1,11 +1,12 @@ |
- |
/* |
* Copyright 2011 Google Inc. |
* |
* Use of this source code is governed by a BSD-style license that can be |
* found in the LICENSE file. |
*/ |
+ |
#include "Test.h" |
+#include "TestClassDef.h" |
#include "gradients/SkClampRange.h" |
#include "SkRandom.h" |
@@ -80,6 +81,7 @@ static void slow_check(const SkClampRange& range, |
} |
} |
+ |
static void test_range(SkFixed fx, SkFixed dx, int count) { |
SkClampRange range; |
range.init(fx, dx, count, V0, V1); |
@@ -88,8 +90,7 @@ static void test_range(SkFixed fx, SkFixed dx, int count) { |
#define ff(x) SkIntToFixed(x) |
-void TestClampRange(skiatest::Reporter* reporter); |
-void TestClampRange(skiatest::Reporter* reporter) { |
+DEF_TEST(ClampRange, reporter) { |
gReporter = reporter; |
test_range(0, 0, 20); |
@@ -126,10 +127,3 @@ void TestClampRange(skiatest::Reporter* reporter) { |
test_range(fx, dx, count); |
} |
} |
- |
-#ifdef USE_REPORTER |
- |
-#include "TestClassDef.h" |
-DEFINE_TESTCLASS("ClampRange", ClampRangeClass, TestClampRange) |
- |
-#endif |