Update utObjImportExport.cpp

Unittest: make execution of base exporter test for obj depending of ASSIMP_BUILD_NO_EXPORT.
pull/1180/head
Kim Kulling 2017-02-06 13:15:53 +01:00 committed by GitHub
parent 8a7e30b6a7
commit db1c6f5fc8
1 changed files with 8 additions and 0 deletions

View File

@ -194,6 +194,8 @@ protected:
return nullptr != scene;
}
#ifndef ASSIMP_BUILD_NO_EXPORT
virtual bool exporterTest() {
::Assimp::Importer importer;
::Assimp::Exporter exporter;
@ -204,6 +206,8 @@ protected:
return true;
}
#endif // ASSIMP_BUILD_NO_EXPORT
protected:
::Assimp::Importer *m_im;
aiScene *m_expectedScene;
@ -213,10 +217,14 @@ TEST_F( utObjImportExport, importObjFromFileTest ) {
EXPECT_TRUE( importerTest() );
}
#ifndef ASSIMP_BUILD_NO_EXPORT
TEST_F( utObjImportExport, exportObjFromFileTest ) {
EXPECT_TRUE( exporterTest() );
}
#endif // ASSIMP_BUILD_NO_EXPORT
TEST_F( utObjImportExport, obj_import_test ) {
const aiScene *scene = m_im->ReadFileFromMemory( (void*) ObjModel.c_str(), ObjModel.size(), 0 );
aiScene *expected = createScene();