Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Jan 22, 2025
1 parent 63cdf88 commit 92f6b13
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/file/driver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 92f6b13

Please sign in to comment.