Loosen up the 0.499 vs. 0.501 subpixel resample test.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Apr 2014 20:54:13 +0000 (22:54 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Apr 2014 20:54:13 +0000 (22:54 +0200)
Seemingly these limits were a bit too tight for something that's
actually supposed to be approximate.

resample_effect_test.cpp

index 9a28013..e90f19e 100644 (file)
@@ -334,11 +334,11 @@ TEST(ResampleEffectTest, ReadHalfPixelFromLeftAndScale) {
        // Check that we are (almost) the same no matter the rounding.
        ASSERT_TRUE(resample_effect->set_float("left", 0.499f));
        tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR);
-       expect_equal(expected_data, out_data, dst_width, 1);
+       expect_equal(expected_data, out_data, dst_width, 1, 1.5f / 255.0f, 0.4f / 255.0f);
 
        ASSERT_TRUE(resample_effect->set_float("left", 0.501f));
        tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR);
-       expect_equal(expected_data, out_data, dst_width, 1);
+       expect_equal(expected_data, out_data, dst_width, 1, 1.5f / 255.0f, 0.4f / 255.0f);
 }
 
 TEST(ResampleEffectTest, Zoom) {