Add unit test for two independent importers loading STL models
parent
c3d8464a37
commit
4ff52c98bb
|
@ -67,6 +67,20 @@ TEST_F( utSTLImporterExporter, importSTLFromFileTest ) {
|
||||||
EXPECT_TRUE( importerTest() );
|
EXPECT_TRUE( importerTest() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_F(utSTLImporterExporter, test_multiple) {
|
||||||
|
// import same file twice, each with its own importer
|
||||||
|
// must work both times and not crash
|
||||||
|
Assimp::Importer importer1;
|
||||||
|
const aiScene *scene1 = importer1.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/Spider_ascii.stl", aiProcess_ValidateDataStructure );
|
||||||
|
EXPECT_NE(nullptr, scene1);
|
||||||
|
|
||||||
|
Assimp::Importer importer2;
|
||||||
|
const aiScene *scene2 = importer2.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/Spider_ascii.stl", aiProcess_ValidateDataStructure );
|
||||||
|
EXPECT_NE(nullptr, scene2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F( utSTLImporterExporter, test_with_two_solids ) {
|
TEST_F( utSTLImporterExporter, test_with_two_solids ) {
|
||||||
Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/triangle_with_two_solids.stl", aiProcess_ValidateDataStructure );
|
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/triangle_with_two_solids.stl", aiProcess_ValidateDataStructure );
|
||||||
|
|
Loading…
Reference in New Issue