From 233ddaa1c94e8c11ef73740b4d9c1aa31a97dd5c Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 3 Apr 2014 22:54:13 +0200 Subject: [PATCH] Loosen up the 0.499 vs. 0.501 subpixel resample test. Seemingly these limits were a bit too tight for something that's actually supposed to be approximate. --- resample_effect_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resample_effect_test.cpp b/resample_effect_test.cpp index 9a28013..e90f19e 100644 --- a/resample_effect_test.cpp +++ b/resample_effect_test.cpp @@ -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) { -- 2.39.2