From 33ab2042e7d780d227e798d649ccc7979b0c5992 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 1 Mar 2013 16:24:25 +0000 Subject: [PATCH] test: disable a few non-essential and potentially incorrect unit tests. --- test/unit/color.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/unit/color.cpp b/test/unit/color.cpp index 6042343c..4bf01c43 100644 --- a/test/unit/color.cpp +++ b/test/unit/color.cpp @@ -123,9 +123,12 @@ LOLUNIT_FIXTURE(ColorTest) String rgb = String::Printf("[%f %f %f]", v1.r, v1.g, v1.b); LOLUNIT_SET_CONTEXT(&rgb[0]); + /* Don’t check hue if saturation is zero. */ if (r != g || g != b) LOLUNIT_ASSERT_DOUBLES_EQUAL(v2.x, v3.x, 0.0001); - LOLUNIT_ASSERT_DOUBLES_EQUAL(v2.y, v3.y, 0.0001); + /* Don’t check saturation if lightness is zero. */ + if (r || g || b) + LOLUNIT_ASSERT_DOUBLES_EQUAL(v2.y, v3.y, 0.0001); LOLUNIT_ASSERT_DOUBLES_EQUAL(v2.z, v3.z, 0.0001); LOLUNIT_UNSET_CONTEXT(&rgb[0]);