diff --git a/src/Test/MeshTest.cpp b/src/Test/MeshTest.cpp index afe8d57db..b3b4fe283 100644 --- a/src/Test/MeshTest.cpp +++ b/src/Test/MeshTest.cpp @@ -34,6 +34,8 @@ class MeshTest: public TestSuite::Tester { public: MeshTest(); + void indexSize(); + void debugPrimitive(); void debugIndexType(); void configurationPrimitive(); @@ -41,12 +43,20 @@ class MeshTest: public TestSuite::Tester { }; MeshTest::MeshTest() { - addTests({&MeshTest::debugPrimitive, + addTests({&MeshTest::indexSize, + + &MeshTest::debugPrimitive, &MeshTest::debugIndexType, &MeshTest::configurationPrimitive, &MeshTest::configurationIndexType}); } +void MeshTest::indexSize() { + CORRADE_COMPARE(Mesh::indexSize(Mesh::IndexType::UnsignedByte), 1); + CORRADE_COMPARE(Mesh::indexSize(Mesh::IndexType::UnsignedShort), 2); + CORRADE_COMPARE(Mesh::indexSize(Mesh::IndexType::UnsignedInt), 4); +} + void MeshTest::debugPrimitive() { std::ostringstream o; Debug(&o) << MeshPrimitive::TriangleFan;