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

Unified Diff: unit_test/scale_test.cc

Issue 1399523004: break up unittests into categories (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: bump version Created 5 years, 2 months 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 | « unit_test/scale_color_test.cc ('k') | unit_test/unit_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unit_test/scale_test.cc
diff --git a/unit_test/scale_test.cc b/unit_test/scale_test.cc
index 23d03ca9d8199d3df8ff2fca0366357aafc0bfbb..49c07da54250d9c5ce89b76312433bff8fe4002e 100644
--- a/unit_test/scale_test.cc
+++ b/unit_test/scale_test.cc
@@ -274,11 +274,11 @@ static int TestFilter_16(int src_width, int src_height,
// The following adjustments in dimensions ensure the scale factor will be
// exactly achieved.
// 2 is chroma subsample
-#define DX(x, nom, denom) ((int)(Abs(x) / nom / 2) * nom * 2)
-#define SX(x, nom, denom) ((int)(x / nom / 2) * denom * 2)
+#define DX(x, nom, denom) static_cast<int>((Abs(x) / nom / 2) * nom * 2)
+#define SX(x, nom, denom) static_cast<int>((x / nom / 2) * denom * 2)
#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \
- TEST_F(libyuvTest, ScaleDownBy##name##_##filter) { \
+ TEST_F(LibYUVScaleTest, ScaleDownBy##name##_##filter) { \
int diff = TestFilter(SX(benchmark_width_, nom, denom), \
SX(benchmark_height_, nom, denom), \
DX(benchmark_width_, nom, denom), \
@@ -287,7 +287,7 @@ static int TestFilter_16(int src_width, int src_height,
disable_cpu_flags_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(libyuvTest, DISABLED_ScaleDownBy##name##_##filter##_16) { \
+ TEST_F(LibYUVScaleTest, DISABLED_ScaleDownBy##name##_##filter##_16) { \
int diff = TestFilter_16(SX(benchmark_width_, nom, denom), \
SX(benchmark_height_, nom, denom), \
DX(benchmark_width_, nom, denom), \
@@ -316,28 +316,28 @@ TEST_FACTOR(3, 1, 3)
#undef DX
#define TEST_SCALETO1(name, width, height, filter, max_diff) \
- TEST_F(libyuvTest, name##To##width##x##height##_##filter) { \
+ TEST_F(LibYUVScaleTest, name##To##width##x##height##_##filter) { \
int diff = TestFilter(benchmark_width_, benchmark_height_, \
width, height, \
kFilter##filter, benchmark_iterations_, \
disable_cpu_flags_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(libyuvTest, name##From##width##x##height##_##filter) { \
+ TEST_F(LibYUVScaleTest, name##From##width##x##height##_##filter) { \
int diff = TestFilter(width, height, \
Abs(benchmark_width_), Abs(benchmark_height_), \
kFilter##filter, benchmark_iterations_, \
disable_cpu_flags_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(libyuvTest, \
+ TEST_F(LibYUVScaleTest, \
DISABLED_##name##To##width##x##height##_##filter##_16) { \
int diff = TestFilter_16(benchmark_width_, benchmark_height_, \
width, height, \
kFilter##filter, benchmark_iterations_); \
EXPECT_LE(diff, max_diff); \
} \
- TEST_F(libyuvTest, \
+ TEST_F(LibYUVScaleTest, \
DISABLED_##name##From##width##x##height##_##filter##_16) { \
int diff = TestFilter_16(width, height, \
Abs(benchmark_width_), Abs(benchmark_height_), \
« no previous file with comments | « unit_test/scale_color_test.cc ('k') | unit_test/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698