Add unit test for issue 1623

pull/1636/head
Alexandre Avenel 2017-12-12 20:34:53 +01:00
parent 949375e695
commit 89ff8fc05d
1 changed files with 12 additions and 0 deletions

View File

@ -85,6 +85,18 @@ TEST_F(utPLYImportExport, exportTest_Success ) {
#endif // ASSIMP_BUILD_NO_EXPORT #endif // ASSIMP_BUILD_NO_EXPORT
//Test issue 1623, crash when loading two PLY files in a row
TEST_F(utPLYImportExport, importerMultipleTest) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/PLY/cube.ply", 0);
EXPECT_NE(nullptr, scene);
scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/PLY/cube.ply", 0);
EXPECT_NE(nullptr, scene);
}
TEST_F( utPLYImportExport, vertexColorTest ) { TEST_F( utPLYImportExport, vertexColorTest ) {
Assimp::Importer importer; Assimp::Importer importer;
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/float-color.ply", 0 ); const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/float-color.ply", 0 );