diff --git a/src/Magnum/MeshTools/Test/GenerateNormalsTest.cpp b/src/Magnum/MeshTools/Test/GenerateNormalsTest.cpp index 9149bb426..a42f0e95d 100644 --- a/src/Magnum/MeshTools/Test/GenerateNormalsTest.cpp +++ b/src/Magnum/MeshTools/Test/GenerateNormalsTest.cpp @@ -362,20 +362,17 @@ void GenerateNormalsTest::smoothNanPosition() { { 0.0f, Constants::nan(), 0.0f}, }; - /* Second triangle is just an edge, so it shouldn't contribute to the first - triangle normal */ + /* Second triangle will poison a part of the first with NaNs, but it won't + crash */ constexpr UnsignedInt indices[] { - 0, 1, 2, 1, 2, 1 + 0, 1, 2, 1, 2, 3 }; Containers::Array generated = generateSmoothNormals(indices, positions); - CORRADE_COMPARE_AS(generated.prefix(3), - (Containers::Array{Containers::InPlaceInit, { - Vector3::zAxis(), - Vector3::zAxis(), - Vector3::zAxis() - }}), TestSuite::Compare::Container>); - CORRADE_COMPARE(Math::isNan(generated[3]), BoolVector3{0x7}); + CORRADE_COMPARE(generated[0], Vector3::zAxis()); + CORRADE_VERIFY(Math::isNan(generated[1]).all()); + CORRADE_VERIFY(Math::isNan(generated[2]).all()); + CORRADE_VERIFY(Math::isNan(generated[3]).all()); } void GenerateNormalsTest::smoothWrongCount() {