From 18c9f5c44185e83e554a098991c935767be82dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 19 Nov 2013 23:31:14 +0100 Subject: [PATCH] Test also default values in Color*::{red,green,blue,cyan,magenta,yellow}(). --- src/Test/ColorTest.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Test/ColorTest.cpp b/src/Test/ColorTest.cpp index f138605b2..545636ca3 100644 --- a/src/Test/ColorTest.cpp +++ b/src/Test/ColorTest.cpp @@ -202,14 +202,18 @@ void ColorTest::colors() { CORRADE_COMPARE(Color4ub::magenta(75, 138), Color4ub(255, 75, 255, 138)); CORRADE_COMPARE(Color4ub::yellow(75, 138), Color4ub(255, 255, 75, 138)); - /* Default alpha */ - CORRADE_COMPARE(Color4ub::red(75), Color4ub(75, 0, 0, 255)); - CORRADE_COMPARE(Color4ub::green(75), Color4ub(0, 75, 0, 255)); - CORRADE_COMPARE(Color4ub::blue(75), Color4ub(0, 0, 75, 255)); - - CORRADE_COMPARE(Color4ub::cyan(75), Color4ub(75, 255, 255, 255)); - CORRADE_COMPARE(Color4ub::magenta(75), Color4ub(255, 75, 255, 255)); - CORRADE_COMPARE(Color4ub::yellow(75), Color4ub(255, 255, 75, 255)); + /* Default values */ + CORRADE_COMPARE(Color3ub::red(), Color3ub(255, 0, 0)); + CORRADE_COMPARE(Color3ub::green(), Color3ub(0, 255, 0)); + CORRADE_COMPARE(Color3ub::blue(), Color3ub(0, 0, 255)); + + CORRADE_COMPARE(Color4ub::red(), Color4ub(255, 0, 0, 255)); + CORRADE_COMPARE(Color4ub::green(), Color4ub(0, 255, 0, 255)); + CORRADE_COMPARE(Color4ub::blue(), Color4ub(0, 0, 255, 255)); + + CORRADE_COMPARE(Color4ub::cyan(), Color4ub(0, 255, 255, 255)); + CORRADE_COMPARE(Color4ub::magenta(), Color4ub(255, 0, 255, 255)); + CORRADE_COMPARE(Color4ub::yellow(), Color4ub(255, 255, 0, 255)); } void ColorTest::fromHue() {