Add test for issue 1970: STL with empty solid

This commit is contained in:
Alexandre Avenel
2018-05-19 23:19:35 +02:00
parent 6c0553d810
commit 4b5c49b087
2 changed files with 21 additions and 0 deletions
+10
View File
@@ -73,6 +73,16 @@ TEST_F( utSTLImporterExporter, test_with_two_solids ) {
EXPECT_NE( nullptr, scene );
}
TEST_F(utSTLImporterExporter, test_with_empty_solid) {
Assimp::Importer importer;
//STL File with empty mesh. We should still be able to import other meshes in this file. ValidateDataStructure should fail.
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/STL/triangle_with_empty_solid.stl", 0);
EXPECT_NE(nullptr, scene);
const aiScene *scene2 = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/STL/triangle_with_empty_solid.stl", aiProcess_ValidateDataStructure);
EXPECT_EQ(nullptr, scene2);
}
#ifndef ASSIMP_BUILD_NO_EXPORT
TEST_F(utSTLImporterExporter, exporterTest) {