summaryrefslogtreecommitdiffstats
path: root/java/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/test')
-rw-r--r--java/test/TestH5Ocreate.java53
-rw-r--r--java/test/TestH5Oparams.java15
-rw-r--r--java/test/testfiles/JUnit-TestH5Ocreate.txt3
-rw-r--r--java/test/testfiles/JUnit-TestH5Oparams.txt5
4 files changed, 74 insertions, 2 deletions
diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java
index c3e36b4..de17d8b 100644
--- a/java/test/TestH5Ocreate.java
+++ b/java/test/TestH5Ocreate.java
@@ -557,4 +557,57 @@ public class TestH5Ocreate {
}
}
+ @Test
+ public void testH5Ocork() {
+ boolean corked = false;
+
+ // Check cork status of the group: not corked
+ try {
+ corked = H5.H5Oare_mdc_flushes_disabled(H5gid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Ocork: H5.H5Oare_mdc_flushes_disabled: " + err);
+ }
+ assertFalse("H5Oare_mdc_flushes_disabled: ", corked);
+
+ // Cork the group: an object
+ try {
+ H5.H5Odisable_mdc_flushes(H5gid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Ocork: H5.H5Odisable_mdc_flushes: " + err);
+ }
+
+ // Check cork status of the group: corked
+ try {
+ corked = H5.H5Oare_mdc_flushes_disabled(H5gid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Ocork: H5.H5Oare_mdc_flushes_disabled: " + err);
+ }
+ assertTrue("H5Oare_mdc_flushes_disabled: ", corked);
+
+ // Unork the group: an object
+ try {
+ H5.H5Oenable_mdc_flushes(H5gid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Ocork: H5.H5Oenable_mdc_flushes: " + err);
+ }
+
+ // Check cork status of the group: corked
+ try {
+ corked = H5.H5Oare_mdc_flushes_disabled(H5gid);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("testH5Ocork: H5.H5Oare_mdc_flushes_disabled: " + err);
+ }
+ assertFalse("H5Oare_mdc_flushes_disabled: ", corked);
+ }
+
}
diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java
index d340ee7..cac3dcd 100644
--- a/java/test/TestH5Oparams.java
+++ b/java/test/TestH5Oparams.java
@@ -159,4 +159,19 @@ public class TestH5Oparams {
H5.H5Orefresh(-1);
}
+ @Test(expected = HDF5LibraryException.class)
+ public void testH5Odisable_mdc_flushes() throws Throwable {
+ H5.H5Odisable_mdc_flushes(-1);
+ }
+
+ @Test(expected = HDF5LibraryException.class)
+ public void testH5Oenable_mdc_flushes() throws Throwable {
+ H5.H5Oenable_mdc_flushes(-1);
+ }
+
+ @Test(expected = HDF5LibraryException.class)
+ public void testH5Oare_mdc_flushes_disabled() throws Throwable {
+ H5.H5Oare_mdc_flushes_disabled(-1);
+ }
+
}
diff --git a/java/test/testfiles/JUnit-TestH5Ocreate.txt b/java/test/testfiles/JUnit-TestH5Ocreate.txt
index c2365e5..5bc9e07 100644
--- a/java/test/testfiles/JUnit-TestH5Ocreate.txt
+++ b/java/test/testfiles/JUnit-TestH5Ocreate.txt
@@ -4,6 +4,7 @@ JUnit version 4.11
.testH5Oget_info_softlink
.testH5Oget_info_externallink
.testH5Ocopy
+.testH5Ocork
.testH5Olink
.testH5Ocomment_by_name
.testH5Oget_info_by_idx_n1_create
@@ -17,5 +18,5 @@ JUnit version 4.11
Time: XXXX
-OK (15 tests)
+OK (16 tests)
diff --git a/java/test/testfiles/JUnit-TestH5Oparams.txt b/java/test/testfiles/JUnit-TestH5Oparams.txt
index 94220b9..bc23695 100644
--- a/java/test/testfiles/JUnit-TestH5Oparams.txt
+++ b/java/test/testfiles/JUnit-TestH5Oparams.txt
@@ -3,8 +3,10 @@ JUnit version 4.11
.testH5Ovisit_by_name_nullname
.testH5Oget_info_invalid
.testH5Ovisit_by_name_null
+.testH5Odisable_mdc_flushes
.testH5Oget_comment_invalid
.testH5Oset_comment_by_name_invalid
+.testH5Oare_mdc_flushes_disabled
.testH5Oopen_null
.testH5Oclose_invalid
.testH5Oflush_invalid
@@ -22,9 +24,10 @@ JUnit version 4.11
.testH5Ocopy_null_current
.testH5Oset_comment_invalid
.testH5Oopen_invalid
+.testH5Oenable_mdc_flushes
.testH5Ovisit_null
Time: XXXX
-OK (24 tests)
+OK (27 tests)