summaryrefslogtreecommitdiff
path: root/test cases/frameworks/25 hdf5/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/frameworks/25 hdf5/main.cpp')
-rw-r--r--test cases/frameworks/25 hdf5/main.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test cases/frameworks/25 hdf5/main.cpp b/test cases/frameworks/25 hdf5/main.cpp
new file mode 100644
index 000000000..1d53e7668
--- /dev/null
+++ b/test cases/frameworks/25 hdf5/main.cpp
@@ -0,0 +1,31 @@
+#include <iostream>
+#include "hdf5.h"
+
+
+int main(void)
+{
+herr_t ier;
+unsigned maj;
+unsigned min;
+unsigned rel;
+
+ier = H5open();
+if (ier) {
+ std::cerr << "Unable to initialize HDF5: %d" << ier << std::endl;
+ return EXIT_FAILURE;
+}
+
+ier = H5get_libversion(&maj, &min, &rel);
+if (ier) {
+ std::cerr << "HDF5 did not initialize!" << std::endl;
+ return EXIT_FAILURE;
+}
+printf("C++ HDF5 version %d.%d.%d\n", maj, min, rel);
+
+ier = H5close();
+if (ier) {
+ std::cerr << "Unable to close HDF5: %d" << ier << std::endl;
+ return EXIT_FAILURE;
+}
+return EXIT_SUCCESS;
+}