From: Steinar H. Gunderson Date: Sat, 13 Oct 2012 12:14:48 +0000 (+0200) Subject: Even more informative output when single-pixel test fails. X-Git-Tag: 1.0~273 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=a5c3a852b9a325f1283a2b286a507e499e394892;ds=sidebyside Even more informative output when single-pixel test fails. --- diff --git a/test_util.cpp b/test_util.cpp index 047eb11..1f7dc1f 100644 --- a/test_util.cpp +++ b/test_util.cpp @@ -87,7 +87,9 @@ void expect_equal(const float *ref, const float *result, unsigned width, unsigne } EXPECT_LT(largest_difference, largest_difference_limit) - << "Largest difference is in x=" << largest_diff_x << ", y=" << largest_diff_y; + << "Largest difference is in x=" << largest_diff_x << ", y=" << largest_diff_y << ":\n" + << "Reference: " << ref[largest_diff_y * width + largest_diff_x] << "\n" + << "Result: " << result[largest_diff_y * width + largest_diff_x]; float rms = sqrt(squared_difference) / (width * height); EXPECT_LT(rms, rms_limit);