diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-14 04:30:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-14 04:30:37 (GMT) |
commit | 0313cbb91d974b153dbe8747d193ac3c619eea3b (patch) | |
tree | af6c4a631d5753685ee0033a6a8415a25fc97672 /java/test | |
parent | 847d675f2743ec420ef6c9efdd6e52ae93b4fe44 (diff) | |
download | hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.zip hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.tar.gz hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.tar.bz2 |
Final merge of page buffering branch to develop
Diffstat (limited to 'java/test')
-rw-r--r-- | java/test/JUnit-interface.txt | 5 | ||||
-rw-r--r-- | java/test/TestH5P.java | 41 |
2 files changed, 31 insertions, 15 deletions
diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt index 34ec02a..cae8cef 100644 --- a/java/test/JUnit-interface.txt +++ b/java/test/JUnit-interface.txt @@ -416,6 +416,7 @@ JUnit version 4.11 .testH5P_layout .testH5Pget_link_creation_order .testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes +.testH5P_file_space_page_size .testH5Pget_shared_mesg_index_Invalid_indexnum .testH5Pset_data_transform_NullExpression .testH5Pset_elink_prefix_null @@ -438,9 +439,9 @@ JUnit version 4.11 .testH5Pset_shared_mesg_index .testH5Pset_copy_object .testH5Pset_link_creation_order_trackedPLUSindexed +.testH5P_file_space_strategy .testH5Pset_copy_object_invalidobject .testH5Pset_est_link_info_InvalidValues -.testH5P_file_space .testH5Pset_local_heap_size_hint .testH5Pget_est_link_info .testH5Pset_scaleoffset @@ -638,7 +639,7 @@ JUnit version 4.11 Time: XXXX -OK (636 tests) +OK (637 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 b8a4376..fa8b525 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -1198,25 +1198,40 @@ public class TestH5P { } @Test - public void testH5P_file_space() { + public void testH5P_file_space_strategy() { long[] threshold = {0}; - int[] strategy = {0}; + boolean[] persist = {false}; + int strategy = 0; try { - H5.H5Pget_file_space(fcpl_id, strategy, threshold); - assertTrue("strategy: "+strategy[0], strategy[0] == HDF5Constants.H5F_FILE_SPACE_ALL); + strategy = H5.H5Pget_file_space_strategy(fcpl_id, persist, threshold); + assertTrue("strategy(default): "+strategy, strategy == HDF5Constants.H5F_FSPACE_STRATEGY_FSM_AGGR); + assertTrue("persist(default): "+persist[0], persist[0] == false); + assertTrue("theshold(default): "+threshold[0], threshold[0] == 1); + H5.H5Pset_file_space_strategy(fcpl_id, HDF5Constants.H5F_FSPACE_STRATEGY_PAGE, true, 1); + strategy = H5.H5Pget_file_space_strategy(fcpl_id, persist, threshold); + assertTrue("strategy: "+strategy, strategy == HDF5Constants.H5F_FSPACE_STRATEGY_PAGE); + assertTrue("persist: "+persist[0], persist[0] == true); assertTrue("theshold: "+threshold[0], threshold[0] == 1); - H5.H5Pset_file_space(fcpl_id, HDF5Constants.H5F_FILE_SPACE_ALL_PERSIST, 10); - H5.H5Pget_file_space(fcpl_id, strategy, threshold); - assertTrue("strategy: "+strategy[0], strategy[0] == HDF5Constants.H5F_FILE_SPACE_ALL_PERSIST); - assertTrue("theshold: "+threshold[0], threshold[0] == 10); - H5.H5Pset_file_space(fcpl_id, HDF5Constants.H5F_FILE_SPACE_VFD, 0); - H5.H5Pget_file_space(fcpl_id, strategy, threshold); - assertTrue("strategy: "+strategy[0], strategy[0] == HDF5Constants.H5F_FILE_SPACE_VFD); - assertTrue("theshold: "+threshold[0], threshold[0] == 10); } catch (Throwable err) { err.printStackTrace(); - fail("testH5P_file_space: " + err); + fail("testH5P_file_space_strategy: " + err); + } + } + + @Test + public void testH5P_file_space_page_size() { + long page_size = 0; + try { + page_size = H5.H5Pget_file_space_page_size(fcpl_id); + assertTrue("page_size(default): "+page_size, page_size == 4096); + H5.H5Pset_file_space_page_size(fcpl_id, 512); + page_size = H5.H5Pget_file_space_page_size(fcpl_id); + assertTrue("page_size: "+page_size, page_size == 512); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5P_file_space_page_size: " + err); } } } |