]> git.sesse.net Git - movit/commitdiff
Even more informative output when single-pixel test fails.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Oct 2012 12:14:48 +0000 (14:14 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Oct 2012 12:14:48 +0000 (14:14 +0200)
test_util.cpp

index 047eb11a18a360de615f08249d50a034df64a5fe..1f7dc1fe8629a2191df3f35123cffb1892875be9 100644 (file)
@@ -87,7 +87,9 @@ void expect_equal(const float *ref, const float *result, unsigned width, unsigne
        }
 
        EXPECT_LT(largest_difference, largest_difference_limit)
        }
 
        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);
 
        float rms = sqrt(squared_difference) / (width * height);
        EXPECT_LT(rms, rms_limit);