Update utObjImportExport.cpp

Unittest: Make obj-exporter test depending on export state.
pull/1180/head
Kim Kulling 2017-02-06 13:06:47 +01:00 committed by GitHub
parent 95387298ab
commit 8a7e30b6a7
1 changed files with 2 additions and 4 deletions

View File

@ -234,15 +234,13 @@ TEST_F( utObjImportExport, issue1111_no_mat_name_Test ) {
EXPECT_NE( nullptr, scene ); EXPECT_NE( nullptr, scene );
} }
#ifndef ASSIMP_BUILD_NO_EXPORT
TEST_F( utObjImportExport, issue809_vertex_color_Test ) { TEST_F( utObjImportExport, issue809_vertex_color_Test ) {
::Assimp::Importer importer; ::Assimp::Importer importer;
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/cube_with_vertexcolors.obj", 0 ); const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/cube_with_vertexcolors.obj", 0 );
EXPECT_NE( nullptr, scene ); EXPECT_NE( nullptr, scene );
#ifndef ASSIMP_BUILD_NO_EXPORT
::Assimp::Exporter exporter; ::Assimp::Exporter exporter;
EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/test.obj" ) ); EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/test.obj" ) );
}
#endif // ASSIMP_BUILD_NO_EXPORT #endif // ASSIMP_BUILD_NO_EXPORT
}