summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5PL.java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-04-05 18:28:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-04-05 18:28:37 (GMT)
commit60167ae8753e48eb00be0dc015d3a476b8e02662 (patch)
tree27b24133d17c959be015e3606f3ef8eb0e8e4f93 /java/test/TestH5PL.java
parentb56fb149c9a3c9dca11b406b7a2488f0c93ee187 (diff)
parent1e0ecb4481e226239c1fd51bd214bd7e7490805d (diff)
downloadhdf5-60167ae8753e48eb00be0dc015d3a476b8e02662.zip
hdf5-60167ae8753e48eb00be0dc015d3a476b8e02662.tar.gz
hdf5-60167ae8753e48eb00be0dc015d3a476b8e02662.tar.bz2
Merge pull request #395 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '1e0ecb4481e226239c1fd51bd214bd7e7490805d': Fix typo deletion HDFFV-10143 Update new feature section. HDFFV-10143 clean up format and function return HDFFV-10143 Add plugin APIs to Java interface Update with checks for index bounds Update tools issues HDFFV-10143 fix use before set HDFFV-10143 surround will fail with try block HDFFV-10143 typo cleanup HDFFV-10143 typo removed Fix code error and use H5PL_MAX_PATH_NUM in test HDFFV-10143 Cleanup due to comments HDFFV-10143 remove debugging output HDFFV-10143 change h5PLget to use buffer like H5Iget_name HDFFV-10143 change put to replace and add const Remove redundant code HDFFV-10143 Use Windows A version of ExpandEnvironmentStrings HDFFV-10143 Fix initial issues from review Remove duplicated paths, add new paths HDFFV-10143 add APIs to manipulate plugin path table
Diffstat (limited to 'java/test/TestH5PL.java')
-rw-r--r--java/test/TestH5PL.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java
index 9f1876c..759db5f 100644
--- a/java/test/TestH5PL.java
+++ b/java/test/TestH5PL.java
@@ -69,6 +69,36 @@ public class TestH5PL {
}
}
+ @Test
+ public void TestH5PLpaths() {
+ try {
+ int original_entries = H5.H5PLsize();
+ H5.H5PLappend("path_one");
+ int plugin_entries = H5.H5PLsize();
+ assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+1) == plugin_entries);
+ H5.H5PLprepend("path_two");
+ plugin_entries = H5.H5PLsize();
+ assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+2) == plugin_entries);
+ H5.H5PLinsert("path_three", original_entries);
+ plugin_entries = H5.H5PLsize();
+ assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+3) == plugin_entries);
+ String first_path = H5.H5PLget(original_entries);
+ assertTrue("First path was : "+first_path + " ",first_path.compareToIgnoreCase("path_three")==0);
+ H5.H5PLreplace("path_four", original_entries);
+ first_path = H5.H5PLget(original_entries);
+ assertTrue("First path changed to : "+first_path + " ",first_path.compareToIgnoreCase("path_four")==0);
+ H5.H5PLremove(original_entries);
+ first_path = H5.H5PLget(original_entries);
+ assertTrue("First path now : "+first_path + " ",first_path.compareToIgnoreCase("path_two")==0);
+ plugin_entries = H5.H5PLsize();
+ assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+2) == plugin_entries);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("TestH5PLpaths " + err);
+ }
+ }
+
@Ignore
public void TestH5PLdlopen() {
long file_id = -1;