From 60524e0367a0b63a0856c8f2b2dd2132bd2bf4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 31 Aug 2016 19:41:01 +0200 Subject: [PATCH] Math: remove now redundant Color test case. At some point before the default Color constructor was different from the ZeroInit one. Not anymore. --- src/Magnum/Math/Test/ColorTest.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Magnum/Math/Test/ColorTest.cpp b/src/Magnum/Math/Test/ColorTest.cpp index dde5d53fc..10871e926 100644 --- a/src/Magnum/Math/Test/ColorTest.cpp +++ b/src/Magnum/Math/Test/ColorTest.cpp @@ -36,7 +36,6 @@ struct ColorTest: Corrade::TestSuite::Tester { void construct(); void constructDefault(); - void constructZero(); void constructNoInit(); void constructOneValue(); void constructParts(); @@ -80,7 +79,6 @@ using namespace Literals; ColorTest::ColorTest() { addTests({&ColorTest::construct, &ColorTest::constructDefault, - &ColorTest::constructZero, &ColorTest::constructNoInit, &ColorTest::constructOneValue, &ColorTest::constructParts, @@ -129,19 +127,15 @@ void ColorTest::constructDefault() { CORRADE_COMPARE(a1, Color3(0.0f, 0.0f, 0.0f)); CORRADE_COMPARE(a2, Color3(0.0f, 0.0f, 0.0f)); - constexpr Color4 b; + constexpr Color4 b1; + constexpr Color4 b2{Math::ZeroInit}; + CORRADE_COMPARE(b1, Color4(0.0f, 0.0f, 0.0f, 0.0f)); + CORRADE_COMPARE(b2, Color4(0.0f, 0.0f, 0.0f, 0.0f)); + constexpr Color4ub c; - CORRADE_COMPARE(b, Color4(0.0f, 0.0f, 0.0f, 0.0f)); CORRADE_COMPARE(c, Color4ub(0, 0, 0, 0)); } -void ColorTest::constructZero() { - constexpr Color3 a{Math::ZeroInit}; - constexpr Color4 b{Math::ZeroInit}; - CORRADE_COMPARE(a, Color3(0.0f, 0.0f, 0.0f)); - CORRADE_COMPARE(b, Color4(0.0f, 0.0f, 0.0f, 0.0f)); -} - void ColorTest::constructNoInit() { Color3 a{1.0f, 0.5f, 0.75f}; Color4 b{1.0f, 0.5f, 0.75f, 0.5f};