Test case when file is nullptr

This commit is contained in:
JosiahWI 2022-10-17 08:36:14 -05:00 committed by Josiah VanderZee
parent 5e2d9d947e
commit 30d5748e0c
1 changed files with 10 additions and 0 deletions

View File

@ -35,3 +35,13 @@ TEST_CASE("minimal triangle has correct vertices") {
device->drop();
}
TEST_CASE("mesh loader returns nullptr when given null file pointer") {
irr::IrrlichtDevice* device { irr::createDevice(irr::video::EDT_NULL) };
irr::scene::ISceneManager* smgr { device->getSceneManager() };
auto* mesh { smgr->getMesh(nullptr) };
CHECK(mesh == nullptr);
device->drop();
}