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

Unified Diff: tests/ColorFilterTest.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/ClipperTest.cpp ('k') | tests/ColorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ColorFilterTest.cpp
diff --git a/tests/ColorFilterTest.cpp b/tests/ColorFilterTest.cpp
index 544c9f0f2569cd10b72ca86bff62abc1c5276a73..8444b73a1de6608ce3c3bb7fcb0c0a14d2363eb0 100644
--- a/tests/ColorFilterTest.cpp
+++ b/tests/ColorFilterTest.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 "SkColor.h"
#include "SkColorPriv.h"
#include "SkColorFilter.h"
@@ -32,7 +33,7 @@ static SkColorFilter* reincarnate_colorfilter(SkFlattenable* obj) {
#define ILLEGAL_MODE ((SkXfermode::Mode)-1)
-static void test_asColorMode(skiatest::Reporter* reporter) {
+DEF_TEST(ColorFilter, reporter) {
SkRandom rand;
for (int mode = 0; mode <= SkXfermode::kLastMode; mode++) {
@@ -93,7 +94,7 @@ static void test_asColorMode(skiatest::Reporter* reporter) {
///////////////////////////////////////////////////////////////////////////////
-static void test_lumaColorFilter(skiatest::Reporter* reporter) {
+DEF_TEST(LumaColorFilter, reporter) {
SkPMColor in, out;
SkAutoTUnref<SkColorFilter> lf(SkLumaColorFilter::Create());
@@ -125,7 +126,3 @@ static void test_lumaColorFilter(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, SkGetPackedB32(out) == 0);
}
}
-
-#include "TestClassDef.h"
-DEFINE_TESTCLASS("ColorFilter", ColorFilterTestClass, test_asColorMode)
-DEFINE_TESTCLASS("LumaColorFilter", LumaColorFilterTestClass, test_lumaColorFilter)
« no previous file with comments | « tests/ClipperTest.cpp ('k') | tests/ColorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698