Test case when file is nullptr

This commit is contained in:
JosiahWI 2022-10-17 08:36:14 -05:00
parent 336aa204fb
commit 3cb592369d
No known key found for this signature in database
GPG Key ID: C7BB8573A4ABC4B9

View File

@ -35,3 +35,13 @@ TEST_CASE("minimal triangle has correct vertices") {
device->drop(); 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();
}