-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for creating soft/hard/external links
- Loading branch information
Showing
3 changed files
with
142 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#define CATCH_CONFIG_RUNNER | ||
#include "catch.hpp" | ||
#include <h5pp/h5pp.h> | ||
|
||
TEST_CASE("Test adding external links from other another file", "[External Link]") { | ||
SECTION("Create an external file A"){ | ||
h5pp::File fileA("output/externalLink-A.h5", h5pp::FilePermission::REPLACE, 2); | ||
fileA.writeDataset(42.0, "dsetA"); | ||
} | ||
SECTION("Add external link to file B") { | ||
h5pp::File fileB("output/externalLink-B.h5", h5pp::FilePermission::REPLACE, 2); | ||
fileB.createExternalLink("externalLink-A.h5", "dsetA", "dsetA"); | ||
REQUIRE(fileB.readDataset<double>("dsetA") == 42.0); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
int main(int argc, char *argv[]) { | ||
|
||
Catch::Session session; // There must be exactly one instance | ||
int returnCode = session.applyCommandLine(argc, argv); | ||
if(returnCode != 0) // Indicates a command line error | ||
return returnCode; | ||
// session.configData().showSuccessfulTests = true; | ||
// session.configData().reporterName = "compact"; | ||
return session.run(); | ||
} |