Browse Source

MeshTools: minor cleanup in some tests.

pull/547/head
Vladimír Vondruš 4 years ago
parent
commit
2f4cd789b6
  1. 5
      src/Magnum/MeshTools/Test/CompressIndicesTest.cpp
  2. 6
      src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp

5
src/Magnum/MeshTools/Test/CompressIndicesTest.cpp

@ -347,12 +347,13 @@ void CompressIndicesTest::compressMeshDataNonIndexed() {
CORRADE_SKIP("CORRADE_NO_ASSERT defined, can't test assertions");
#endif
Trade::MeshData mesh{MeshPrimitive::TriangleFan, 5};
/* Test both r-value and l-value overload */
std::ostringstream out;
Error redirectError{&out};
Trade::MeshData mesh{MeshPrimitive::TriangleFan, 5};
MeshTools::compressIndices(mesh);
MeshTools::compressIndices(Trade::MeshData{MeshPrimitive::TriangleFan, 5});
MeshTools::compressIndices(std::move(mesh));
CORRADE_COMPARE(out.str(),
"MeshTools::compressIndices(): mesh data not indexed\n"
"MeshTools::compressIndices(): mesh data not indexed\n");

6
src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp

@ -850,8 +850,7 @@ void RemoveDuplicatesTest::removeDuplicatesMeshDataImplementationSpecificVertexF
std::ostringstream out;
Error redirectError{&out};
MeshTools::removeDuplicates(Trade::MeshData{MeshPrimitive::Points, nullptr, {
Trade::MeshAttributeData{Trade::MeshAttribute::Position,
VertexFormat::Vector3, nullptr},
Trade::MeshAttributeData{Trade::MeshAttribute::Position, VertexFormat::Vector3, nullptr},
Trade::MeshAttributeData{Trade::MeshAttribute::Normal, vertexFormatWrap(0xcaca), nullptr}
}});
CORRADE_COMPARE(out.str(),
@ -1200,8 +1199,7 @@ void RemoveDuplicatesTest::removeDuplicatesMeshDataFuzzyImplementationSpecificVe
std::ostringstream out;
Error redirectError{&out};
MeshTools::removeDuplicatesFuzzy(Trade::MeshData{MeshPrimitive::Points, nullptr, {
Trade::MeshAttributeData{Trade::MeshAttribute::Position,
VertexFormat::Vector3, nullptr},
Trade::MeshAttributeData{Trade::MeshAttribute::Position, VertexFormat::Vector3, nullptr},
Trade::MeshAttributeData{Trade::MeshAttribute::Normal, vertexFormatWrap(0xcaca), nullptr}
}});
CORRADE_COMPARE(out.str(),

Loading…
Cancel
Save