Extended cubic surface extractor test.

This commit is contained in:
unknown 2012-03-27 16:35:15 +02:00
parent b3f3723a53
commit a15c075c9b

View File

@ -105,6 +105,8 @@ void TestCubicSurfaceExtractor::testExecute()
const static uint32_t uMaterialToCheck = 3000; const static uint32_t uMaterialToCheck = 3000;
const static float fExpectedMaterial = 42.0f; const static float fExpectedMaterial = 42.0f;
const static float fNoMaterial = 1.0f; const static float fNoMaterial = 1.0f;
const static uint32_t uIndexToCheck = 2000;
const static uint32_t uExpectedIndex = 1334;
SurfaceMesh<PositionMaterialNormal> mesh; SurfaceMesh<PositionMaterialNormal> mesh;
@ -157,6 +159,7 @@ void TestCubicSurfaceExtractor::testExecute()
QCOMPARE(mesh.getNoOfVertices(), uExpectedVertices); QCOMPARE(mesh.getNoOfVertices(), uExpectedVertices);
QCOMPARE(mesh.getNoOfIndices(), uExpectedIndices); QCOMPARE(mesh.getNoOfIndices(), uExpectedIndices);
QCOMPARE(mesh.getVertices()[uMaterialToCheck].getMaterial(), fExpectedMaterial); QCOMPARE(mesh.getVertices()[uMaterialToCheck].getMaterial(), fExpectedMaterial);
QCOMPARE(mesh.getIndices()[uIndexToCheck], uExpectedIndex);
} }
QTEST_MAIN(TestCubicSurfaceExtractor) QTEST_MAIN(TestCubicSurfaceExtractor)