|
|
|
@ -30,6 +30,7 @@ class VectorTest: public Corrade::TestSuite::Tester { |
|
|
|
|
|
|
|
|
|
|
|
void constructFromData(); |
|
|
|
void constructFromData(); |
|
|
|
void constructDefault(); |
|
|
|
void constructDefault(); |
|
|
|
|
|
|
|
void constructOneValue(); |
|
|
|
void constructConversion(); |
|
|
|
void constructConversion(); |
|
|
|
void data(); |
|
|
|
void data(); |
|
|
|
|
|
|
|
|
|
|
|
@ -66,6 +67,7 @@ typedef Vector<4, std::int32_t> Vector4i; |
|
|
|
VectorTest::VectorTest() { |
|
|
|
VectorTest::VectorTest() { |
|
|
|
addTests(&VectorTest::constructFromData, |
|
|
|
addTests(&VectorTest::constructFromData, |
|
|
|
&VectorTest::constructDefault, |
|
|
|
&VectorTest::constructDefault, |
|
|
|
|
|
|
|
&VectorTest::constructOneValue, |
|
|
|
&VectorTest::constructConversion, |
|
|
|
&VectorTest::constructConversion, |
|
|
|
&VectorTest::data, |
|
|
|
&VectorTest::data, |
|
|
|
|
|
|
|
|
|
|
|
@ -104,6 +106,12 @@ void VectorTest::constructDefault() { |
|
|
|
CORRADE_COMPARE(Vector4(), Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
|
|
|
CORRADE_COMPARE(Vector4(), Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void VectorTest::constructOneValue() { |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("Constructing Vector from one value is broken."); |
|
|
|
|
|
|
|
CORRADE_VERIFY(false); |
|
|
|
|
|
|
|
// CORRADE_COMPARE(Vector4(7.25f), Vector4(7.25f, 7.25f, 7.25f, 7.25f));
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void VectorTest::constructConversion() { |
|
|
|
void VectorTest::constructConversion() { |
|
|
|
Vector4 floatingPoint(1.3f, 2.7f, -15.0f, 7.0f); |
|
|
|
Vector4 floatingPoint(1.3f, 2.7f, -15.0f, 7.0f); |
|
|
|
Vector4 floatingPointRounded(1.0f, 2.0f, -15.0f, 7.0f); |
|
|
|
Vector4 floatingPointRounded(1.0f, 2.0f, -15.0f, 7.0f); |
|
|
|
|