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

Unified Diff: tests/MathTest.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/MD5Test.cpp ('k') | tests/Matrix44Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MathTest.cpp
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index f5c61cbeb851673bc45fa2089ef59424a47e62fb..22680c13e62334e389a7ff9bb9caa64046cd763d 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -1,17 +1,19 @@
-
/*
* 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 "SkColorPriv.h"
+#include "SkEndian.h"
#include "SkFloatBits.h"
#include "SkFloatingPoint.h"
#include "SkMathPriv.h"
#include "SkPoint.h"
#include "SkRandom.h"
-#include "SkColorPriv.h"
static void test_clz(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, 32 == SkCLZ(0));
@@ -430,7 +432,7 @@ static void test_copysign(skiatest::Reporter* reporter) {
}
}
-static void TestMath(skiatest::Reporter* reporter) {
+DEF_TEST(Math, reporter) {
int i;
int32_t x;
SkRandom rand;
@@ -646,19 +648,12 @@ static void TestMath(skiatest::Reporter* reporter) {
test_clz(reporter);
}
-#include "TestClassDef.h"
-DEFINE_TESTCLASS("Math", MathTestClass, TestMath)
-
-///////////////////////////////////////////////////////////////////////////////
-
-#include "SkEndian.h"
-
template <typename T> struct PairRec {
T fYin;
T fYang;
};
-static void TestEndian(skiatest::Reporter* reporter) {
+DEF_TEST(TestEndian, reporter) {
static const PairRec<uint16_t> g16[] = {
{ 0x0, 0x0 },
{ 0xFFFF, 0xFFFF },
@@ -690,8 +685,6 @@ static void TestEndian(skiatest::Reporter* reporter) {
}
}
-DEFINE_TESTCLASS("Endian", EndianTestClass, TestEndian)
-
template <typename T>
static void test_divmod(skiatest::Reporter* r) {
const struct {
« no previous file with comments | « tests/MD5Test.cpp ('k') | tests/Matrix44Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698