Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Unified Diff: tests/ClampRangeTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/CanvasTest.cpp ('k') | tests/ClipCubicTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tests/CanvasTest.cpp ('k') | tests/ClipCubicTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698