Make unit test more useful in case importer breaks again
parent
96eb87265e
commit
57306bcd63
|
@ -51,7 +51,8 @@ public:
|
||||||
virtual bool importerTest() {
|
virtual bool importerTest() {
|
||||||
Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/IRR/box.irr", aiProcess_ValidateDataStructure);
|
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/IRR/box.irr", aiProcess_ValidateDataStructure);
|
||||||
return nullptr != scene;
|
// Only one box thus only one mesh
|
||||||
|
return nullptr != scene && scene->mNumMeshes == 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -63,4 +64,7 @@ TEST_F(utIrrImportExport, importSGIrrTest) {
|
||||||
Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/IRR/dawfInCellar_SameHierarchy.irr", aiProcess_ValidateDataStructure);
|
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/IRR/dawfInCellar_SameHierarchy.irr", aiProcess_ValidateDataStructure);
|
||||||
EXPECT_NE(nullptr, scene);
|
EXPECT_NE(nullptr, scene);
|
||||||
|
EXPECT_EQ(scene->mNumMeshes, 2);
|
||||||
|
EXPECT_EQ(scene->mNumMaterials, 2);
|
||||||
|
EXPECT_GT(scene->mMeshes[0]->mNumVertices, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue