diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 506f641e..4da642c3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -75,4 +75,4 @@ ADD_TEST(VolumeSubclassExtractSurfaceTest ${LATEST_TEST} testExtractSurface) # ClassName tests CREATE_TEST(TestVoxels.h TestVoxels.cpp TestVoxels) -ADD_TEST(VoxelsTraitsTest ${LATEST_TEST} testTraits) +ADD_TEST(VoxelsTraitsTest ${LATEST_TEST} testVoxelTypeLimits) diff --git a/tests/TestVoxels.cpp b/tests/TestVoxels.cpp index 665ae7c4..9ba2e8ba 100644 --- a/tests/TestVoxels.cpp +++ b/tests/TestVoxels.cpp @@ -33,8 +33,11 @@ freely, subject to the following restrictions: using namespace PolyVox; -void TestVoxels::testTraits() +void TestVoxels::testVoxelTypeLimits() { + // It's worth testing these as they are not all explictily defined (e.g. Density8 is just a + // typedef of DensityI8), and in the future we might define then with bitwise magic or something. + QCOMPARE(VoxelTypeTraits::MinDensity, Density8::DensityType(0)); QCOMPARE(VoxelTypeTraits::MaxDensity, Density8::DensityType(255)); diff --git a/tests/TestVoxels.h b/tests/TestVoxels.h index 0892b4c7..b301133a 100644 --- a/tests/TestVoxels.h +++ b/tests/TestVoxels.h @@ -31,7 +31,7 @@ class TestVoxels: public QObject Q_OBJECT private slots: - void testTraits(); + void testVoxelTypeLimits(); }; #endif