diff --git a/test/file/driver_test.cpp b/test/file/driver_test.cpp index f07b4f9370..cf888e83b1 100644 --- a/test/file/driver_test.cpp +++ b/test/file/driver_test.cpp @@ -34,6 +34,18 @@ using namespace hdf5; + +class DLL_EXPORT MyPosixDriver : public hdf5::file::PosixDriver +{ + public: + MyPosixDriver() {} + + virtual hdf5::file::DriverID id() const noexcept override{ + return hdf5::file::DriverID::Custom; + } +}; + + SCENARIO("Construction of a memory driver instance", "[file,h5cpp,driver]") { GIVEN("a default constructed instance") { file::MemoryDriver m; @@ -99,6 +111,11 @@ SECTION("the posix driver") { REQUIRE(m.id() == file::DriverID::Posix); } + SECTION("the custom driver") { + MyPosixDriver m; + REQUIRE(m.id() == file::DriverID::Custom); +} + #ifdef H5CPP_WITH_MPI SECTION("the MPI driver") {