Browse Source

Test Mesh::indexSize().

I wonder if it is possible to test the function even more.
pull/51/head
Vladimír Vondruš 13 years ago
parent
commit
1b9ff6a2df
  1. 12
      src/Test/MeshTest.cpp

12
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;

Loading…
Cancel
Save