summaryrefslogtreecommitdiffstats
path: root/java/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/test')
-rw-r--r--java/test/JUnit-interface.txt9
-rw-r--r--java/test/TestH5P.java53
-rw-r--r--java/test/TestH5Pfapl.java14
-rw-r--r--java/test/TestH5Pvirtual.java33
4 files changed, 107 insertions, 2 deletions
diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt
index ab2f3b1..91ea286 100644
--- a/java/test/JUnit-interface.txt
+++ b/java/test/JUnit-interface.txt
@@ -415,6 +415,7 @@ JUnit version 4.11
.testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue
.testH5P_layout
.testH5Pget_link_creation_order
+.testH5Pget_efile_prefix
.testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes
.testH5P_file_space_page_size
.testH5Pget_shared_mesg_index_Invalid_indexnum
@@ -444,6 +445,7 @@ JUnit version 4.11
.testH5Pset_est_link_info_InvalidValues
.testH5Pset_local_heap_size_hint
.testH5Pget_est_link_info
+.testH5Pset_efile_prefix_null
.testH5Pset_scaleoffset
.testH5Pset_create_intermediate_group_invalidobject
.testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue
@@ -466,6 +468,7 @@ JUnit version 4.11
.testH5Pget_sym_k_null
.testH5Pset_nlinks
.testH5P_obj_track_times
+.testH5Pset_efile_prefix
.testH5P_userblock
.testH5Pget_local_heap_size_hint
.testH5Pset_shared_mesg_index_Invalid_indexnum
@@ -504,6 +507,7 @@ JUnit version 4.11
.testH5Pset_mdc_config
.testH5P_small_data_block_size
.testH5Pset_fapl_log
+.testH5P_evict_on_close
.testH5Pset_libver_bounds
.testH5P_sieve_buf_size
.testH5P_elink_file_cache_size
@@ -530,11 +534,14 @@ JUnit version 4.11
.testH5Pget_source_datasetname
.testH5Pvirtual_storage
.testH5Pget_selection_source_dataset
+.testH5Pget_virtual_prefix
.testH5Pget_source_filename
.testH5Pset_get_virtual_printf_gap
.testH5Pget_virtual_count
+.testH5Pset_virtual_prefix
.testH5Pset_get_virtual_view
.testH5Pget_mapping_parameters
+.testH5Pset_virtual_prefix_null
.testH5P_genprop_basic_class
.testH5P_genprop_class_iter
.testH5P_genprop_basic_class_prop
@@ -640,7 +647,7 @@ JUnit version 4.11
Time: XXXX
-OK (638 tests)
+OK (645 tests)
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists
diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java
index 5aafb5b..9e45e4c 100644
--- a/java/test/TestH5P.java
+++ b/java/test/TestH5P.java
@@ -28,6 +28,7 @@ import hdf.hdf5lib.exceptions.HDF5LibraryException;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
@@ -852,7 +853,7 @@ public class TestH5P {
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5Pset_est_link_info: " + err);
+ fail("H5Pset_elink_prefix: " + err);
}
assertTrue("H5Pset_elink_prefix", ret_val >= 0);
}
@@ -1232,4 +1233,54 @@ public class TestH5P {
fail("testH5P_file_space_page_size: " + err);
}
}
+
+ @Test
+ public void testH5Pset_efile_prefix() {
+ String prefix = "tmp";
+ try {
+ H5.H5Pset_efile_prefix(lapl_id, prefix);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5Pset_efile_prefix: " + err);
+ }
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void testH5Pset_efile_prefix_null() throws Throwable{
+ H5.H5Pset_efile_prefix(lapl_id, null);
+ }
+
+ @Test
+ public void testH5Pget_efile_prefix() {
+ String prefix = "tmp";
+ String pre = "";
+
+ try {
+ H5.H5Pset_efile_prefix(lapl_id, prefix);
+ pre = H5.H5Pget_efile_prefix(lapl_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5Pget_efile_prefix: " + err);
+ }
+ assertTrue("The prefix: ", prefix.equals(pre));
+ }
+
+ @Ignore
+ public void testH5P_chunk_opts() {
+ int chunk_opts = -1;
+
+ try {
+ chunk_opts = H5.H5Pget_chunk_opts(ocpl_id);
+ assertTrue("chunk_opts: "+chunk_opts, chunk_opts == 0);
+ H5.H5Pset_chunk_opts(ocpl_id, HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
+ chunk_opts = H5.H5Pget_chunk_opts(ocpl_id);
+ assertTrue("chunk_opts: "+chunk_opts, chunk_opts == HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5Pget_lchunk_opts: " + err);
+ }
+ }
}
diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java
index d4a2231..48a5986 100644
--- a/java/test/TestH5Pfapl.java
+++ b/java/test/TestH5Pfapl.java
@@ -1376,4 +1376,18 @@ public class TestH5Pfapl {
deleteH5file();
_deleteLogFile();
}
+
+ @Test
+ public void testH5P_evict_on_close() {
+ boolean ret_val_id = false;
+ try {
+ H5.H5Pset_evict_on_close(fapl_id, true);
+ ret_val_id = H5.H5Pget_evict_on_close(fapl_id);
+ assertTrue("H5P_evict_on_close", ret_val_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5P_evict_on_close: " + err);
+ }
+ }
}
diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java
index 40cfbac..ff2e4dc 100644
--- a/java/test/TestH5Pvirtual.java
+++ b/java/test/TestH5Pvirtual.java
@@ -429,4 +429,37 @@ public class TestH5Pvirtual {
try {H5.H5Dclose(H5did);} catch (Exception ex) {}
}
}
+
+ @Test
+ public void testH5Pset_virtual_prefix() {
+ String prefix = "tmp";
+ try {
+ H5.H5Pset_virtual_prefix(H5dapl_id, prefix);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5Pset_virtual_prefix: " + err);
+ }
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void testH5Pset_virtual_prefix_null() throws Throwable{
+ H5.H5Pset_virtual_prefix(H5dapl_id, null);
+ }
+
+ @Test
+ public void testH5Pget_virtual_prefix() {
+ String prefix = "tmp";
+ String pre = "";
+
+ try {
+ H5.H5Pset_virtual_prefix(H5dapl_id, prefix);
+ pre = H5.H5Pget_virtual_prefix(H5dapl_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5Pget_virtual_prefix: " + err);
+ }
+ assertTrue("The prefix: ", prefix.equals(pre));
+ }
}