Browse Source

Math: remove now redundant Color test case.

At some point before the default Color constructor was different from
the ZeroInit one. Not anymore.
pull/175/merge
Vladimír Vondruš 10 years ago
parent
commit
60524e0367
  1. 16
      src/Magnum/Math/Test/ColorTest.cpp

16
src/Magnum/Math/Test/ColorTest.cpp

@ -36,7 +36,6 @@ struct ColorTest: Corrade::TestSuite::Tester {
void construct(); void construct();
void constructDefault(); void constructDefault();
void constructZero();
void constructNoInit(); void constructNoInit();
void constructOneValue(); void constructOneValue();
void constructParts(); void constructParts();
@ -80,7 +79,6 @@ using namespace Literals;
ColorTest::ColorTest() { ColorTest::ColorTest() {
addTests({&ColorTest::construct, addTests({&ColorTest::construct,
&ColorTest::constructDefault, &ColorTest::constructDefault,
&ColorTest::constructZero,
&ColorTest::constructNoInit, &ColorTest::constructNoInit,
&ColorTest::constructOneValue, &ColorTest::constructOneValue,
&ColorTest::constructParts, &ColorTest::constructParts,
@ -129,19 +127,15 @@ void ColorTest::constructDefault() {
CORRADE_COMPARE(a1, Color3(0.0f, 0.0f, 0.0f)); CORRADE_COMPARE(a1, Color3(0.0f, 0.0f, 0.0f));
CORRADE_COMPARE(a2, 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; constexpr Color4ub c;
CORRADE_COMPARE(b, Color4(0.0f, 0.0f, 0.0f, 0.0f));
CORRADE_COMPARE(c, Color4ub(0, 0, 0, 0)); 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() { void ColorTest::constructNoInit() {
Color3 a{1.0f, 0.5f, 0.75f}; Color3 a{1.0f, 0.5f, 0.75f};
Color4 b{1.0f, 0.5f, 0.75f, 0.5f}; Color4 b{1.0f, 0.5f, 0.75f, 0.5f};

Loading…
Cancel
Save