Commit d3bc0103 authored by fbarchard@google.com's avatar fbarchard@google.com

Use expect near to see exact values for differences.

BUG=269
TESTED=local unittest
R=harryjin@google.com

Review URL: https://webrtc-codereview.appspot.com/32349004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1204 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 7866d8e0
......@@ -657,30 +657,24 @@ TEST_F(libyuvTest, FMT_A##To##FMT_PLANAR##N) { \
} \
for (int i = 0; i < kHeight; ++i) { \
for (int j = 0; j < kWidth; ++j) { \
int abs_diff = \
abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
static_cast<int>(dst_y_opt[i * kWidth + j])); \
EXPECT_LE(abs_diff, DIFF); \
EXPECT_NEAR(static_cast<int>(dst_y_c[i * kWidth + j]), \
static_cast<int>(dst_y_opt[i * kWidth + j]), DIFF); \
} \
} \
for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
int abs_diff = \
abs(static_cast<int>(dst_u_c[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
static_cast<int>(dst_u_opt[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
EXPECT_LE(abs_diff, DIFF); \
EXPECT_NEAR(static_cast<int>(dst_u_c[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), \
static_cast<int>(dst_u_opt[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), DIFF); \
} \
} \
for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \
for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
int abs_diff = \
abs(static_cast<int>(dst_v_c[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
static_cast<int>(dst_v_opt[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
EXPECT_LE(abs_diff, DIFF); \
EXPECT_NEAR(static_cast<int>(dst_v_c[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), \
static_cast<int>(dst_v_opt[i * \
SUBSAMPLE(kWidth, SUBSAMP_X) + j]), DIFF); \
} \
} \
free_aligned_buffer_64(dst_y_c); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment