Make unit test more useful in case importer breaks again

pull/5166/head
PencilAmazing 2023-07-02 14:55:25 -04:00
parent 96eb87265e
commit 57306bcd63
1 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,8 @@ public:
virtual bool importerTest() {
Assimp::Importer importer;
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;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/IRR/dawfInCellar_SameHierarchy.irr", aiProcess_ValidateDataStructure);
EXPECT_NE(nullptr, scene);
EXPECT_EQ(scene->mNumMeshes, 2);
EXPECT_EQ(scene->mNumMaterials, 2);
EXPECT_GT(scene->mMeshes[0]->mNumVertices, 0);
}