Fixed: Use CMake to identify directory containing test models
parent
8b27163c20
commit
08169a6934
|
@ -54,6 +54,8 @@ add_executable( unit
|
|||
${TEST_SRCS}
|
||||
)
|
||||
|
||||
add_definitions(-DASSIMP_TEST_MODELS_DIR="${CMAKE_CURRENT_LIST_DIR}/models")
|
||||
|
||||
SET_PROPERTY( TARGET assimp PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} )
|
||||
|
||||
add_dependencies( unit gtest )
|
||||
|
|
|
@ -43,7 +43,7 @@ TEST_F(ColladaExportCamera, testExportCamera)
|
|||
{
|
||||
const char* file = "cameraExp.dae";
|
||||
|
||||
const aiScene* pTest = im->ReadFile("../test/models/Collada/cameras.dae",0);
|
||||
const aiScene* pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/Collada/cameras.dae",0);
|
||||
ASSERT_TRUE(pTest!=NULL);
|
||||
ASSERT_TRUE(pTest->HasCameras());
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ TEST_F(ColladaExportLight, testExportLight)
|
|||
{
|
||||
const char* file = "cameraExp.dae";
|
||||
|
||||
const aiScene* pTest = im->ReadFile("../test/models/Collada/lights.dae",0);
|
||||
const aiScene* pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/Collada/lights.dae",0);
|
||||
ASSERT_TRUE(pTest!=NULL);
|
||||
ASSERT_TRUE(pTest->HasLights());
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ public:
|
|||
ex = new Assimp::Exporter();
|
||||
im = new Assimp::Importer();
|
||||
|
||||
pTest = im->ReadFile("../../test/models/X/test.x",0);
|
||||
pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/test.x",0);
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
|
|
|
@ -219,13 +219,13 @@ TEST_F(ImporterTest, testMultipleReads)
|
|||
aiProcess_OptimizeMeshes |
|
||||
aiProcess_OptimizeGraph;
|
||||
|
||||
EXPECT_TRUE(pImp->ReadFile("../test/models/X/test.x",flags));
|
||||
//EXPECT_TRUE(pImp->ReadFile("../../test/models/X/dwarf.x",flags)); # is in nonbsd
|
||||
EXPECT_TRUE(pImp->ReadFile("../test/models/X/Testwuson.X",flags));
|
||||
EXPECT_TRUE(pImp->ReadFile("../test/models/X/anim_test.x",flags));
|
||||
//EXPECT_TRUE(pImp->ReadFile("../../test/models/X/dwarf.x",flags)); # is in nonbsd
|
||||
EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/test.x",flags));
|
||||
//EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/dwarf.x",flags)); # is in nonbsd
|
||||
EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/Testwuson.X",flags));
|
||||
EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/anim_test.x",flags));
|
||||
//EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/dwarf.x",flags)); # is in nonbsd
|
||||
|
||||
EXPECT_TRUE(pImp->ReadFile("../test/models/X/anim_test.x",flags));
|
||||
EXPECT_TRUE(pImp->ReadFile("../test/models/X/BCN_Epileptic.X",flags));
|
||||
//EXPECT_TRUE(pImp->ReadFile("../../test/models/X/dwarf.x",flags)); # is in nonbsd
|
||||
EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/anim_test.x",flags));
|
||||
EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/BCN_Epileptic.X",flags));
|
||||
//EXPECT_TRUE(pImp->ReadFile(ASSIMP_TEST_MODELS_DIR "/X/dwarf.x",flags)); # is in nonbsd
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue