Browse Source

Math: we're not signing here, no.

pull/317/head
Vladimír Vondruš 7 years ago
parent
commit
38573c7a82
  1. 12
      src/Magnum/Math/Test/PackingTest.cpp

12
src/Magnum/Math/Test/PackingTest.cpp

@ -40,8 +40,8 @@ struct PackingTest: Corrade::TestSuite::Tester {
void unpackSigned(); void unpackSigned();
void packUnsigned(); void packUnsigned();
void packSigned(); void packSigned();
void reunpackUnsinged(); void reunpackUnsigned();
void reunpackSinged(); void reunpackSigned();
void unpackTypeDeduction(); void unpackTypeDeduction();
void pack8bitRoundtrip(); void pack8bitRoundtrip();
@ -62,8 +62,8 @@ PackingTest::PackingTest() {
&PackingTest::unpackSigned, &PackingTest::unpackSigned,
&PackingTest::packUnsigned, &PackingTest::packUnsigned,
&PackingTest::packSigned, &PackingTest::packSigned,
&PackingTest::reunpackUnsinged, &PackingTest::reunpackUnsigned,
&PackingTest::reunpackSinged, &PackingTest::reunpackSigned,
&PackingTest::unpackTypeDeduction}); &PackingTest::unpackTypeDeduction});
addRepeatedTests({&PackingTest::pack8bitRoundtrip}, 256); addRepeatedTests({&PackingTest::pack8bitRoundtrip}, 256);
@ -235,7 +235,7 @@ void PackingTest::packSigned() {
CORRADE_COMPARE((Math::pack<Vector3b, 6>(Vector3(0.0f, -1.0f, 0.5f))), Vector3b(0, -31, 16)); CORRADE_COMPARE((Math::pack<Vector3b, 6>(Vector3(0.0f, -1.0f, 0.5f))), Vector3b(0, -31, 16));
} }
void PackingTest::reunpackUnsinged() { void PackingTest::reunpackUnsigned() {
CORRADE_COMPARE(Math::unpack<Float>(Math::pack<UnsignedByte>(0.0f)), 0.0f); CORRADE_COMPARE(Math::unpack<Float>(Math::pack<UnsignedByte>(0.0f)), 0.0f);
CORRADE_COMPARE(Math::unpack<Float>(Math::pack<UnsignedByte>(1.0f)), 1.0f); CORRADE_COMPARE(Math::unpack<Float>(Math::pack<UnsignedByte>(1.0f)), 1.0f);
@ -256,7 +256,7 @@ void PackingTest::reunpackUnsinged() {
#endif #endif
} }
void PackingTest::reunpackSinged() { void PackingTest::reunpackSigned() {
CORRADE_COMPARE(Math::unpack<Float>(Math::pack<Byte>(-1.0f)), -1.0f); CORRADE_COMPARE(Math::unpack<Float>(Math::pack<Byte>(-1.0f)), -1.0f);
CORRADE_COMPARE(Math::unpack<Float>(Math::pack<Byte>(0.0f)), 0.0f); CORRADE_COMPARE(Math::unpack<Float>(Math::pack<Byte>(0.0f)), 0.0f);
CORRADE_COMPARE(Math::unpack<Float>(Math::pack<Byte>(1.0f)), 1.0f); CORRADE_COMPARE(Math::unpack<Float>(Math::pack<Byte>(1.0f)), 1.0f);

Loading…
Cancel
Save