#include "estoraged_conf.hpp" #include "verifyDriveGeometry.hpp" #include #include #include #include using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; TEST(VerifyGeometry, TooBigFail) { VerifyDriveGeometry maxVerify(""); EXPECT_THROW(maxVerify.geometryOkay(ERASE_MAX_GEOMETRY + 1), InternalFailure); } TEST(VerifyGeometry, TooSmallFail) { VerifyDriveGeometry minVerify(""); EXPECT_THROW(minVerify.geometryOkay(ERASE_MIN_GEOMETRY - 1), InternalFailure); } TEST(VerifyGeometry, pass) { VerifyDriveGeometry passVerify(""); EXPECT_NO_THROW(passVerify.geometryOkay(ERASE_MIN_GEOMETRY + 1)); }