diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2017-04-12 15:54:28 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2017-04-12 15:54:28 (GMT) |
commit | 0ed4b80ed95f85b06c18c9c6901afe83816033c9 (patch) | |
tree | e50039c02e37815860ace3b0ebb0de7de8593047 /java | |
parent | 7c2555058a7c4d2d9c483554a4c00ce9cf8b6b84 (diff) | |
parent | f83622042a8a6271dd502194867c00e8a89ec9fc (diff) | |
download | hdf5-0ed4b80ed95f85b06c18c9c6901afe83816033c9.zip hdf5-0ed4b80ed95f85b06c18c9c6901afe83816033c9.tar.gz hdf5-0ed4b80ed95f85b06c18c9c6901afe83816033c9.tar.bz2 |
Merge pull request #417 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1
* commit 'f83622042a8a6271dd502194867c00e8a89ec9fc': (34 commits)
Add 1.8 complete HISTORY file.
Add history files from 1.10.0 release.
Fix URL name
DAILYTEST-250 change test props to reduce timeout
Fix for H5Dset_extent test failure with extensive array indexing (HDFFV-9771) 1) Calculate chunk index for extensive array index based on swizzled max chunks when unlim_dim > 0 2) Minor fixes to test/fheap.c that somehow were missed from last check in. See pull request #396 review comments.
Removed commeted out code from H5C_dump_coll_write_list()
Checkin of fix for CGNS bug (https://jira.hdfgroup.org/browse/HDFFV-10055).
HDFFV-10143 add missing javadoc param
Add missing test status
Fix CMake regex commands
Modify test/fheap.c to run with various file space strategies and/or page buffering Modify test/fheap.c to run with different combinations of file space strategies and page buffering only when ExpressMode is 0 (HDF5TestExpress is 0). Tested on ostrich, platypus, mayll, emu, osx1010test, quail, kite, kituo.
Updated the H5L.c error message after additional thought. Fix for HDFFV-10141.
Updated an error message in H5L.c to be more helpful. Fixes HDFFV-10141.
Re-enabled fixed array index testing in the test_random_rank4_vl() test in test/set_extent. This was fixed some time ago, but the test was never re-enabled for that index type.
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
...
Diffstat (limited to 'java')
-rw-r--r-- | java/src/hdf/hdf5lib/H5.java | 82 | ||||
-rw-r--r-- | java/src/jni/exceptionImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5Constants.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5Imp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5aImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5dImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5eImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5fImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5gImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5iImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5jni.h | 2 | ||||
-rw-r--r-- | java/src/jni/h5lImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5oImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5pImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5plImp.c | 163 | ||||
-rw-r--r-- | java/src/jni/h5plImp.h | 63 | ||||
-rw-r--r-- | java/src/jni/h5rImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5sImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5tImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5util.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5util.h | 2 | ||||
-rw-r--r-- | java/src/jni/h5zImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/nativeData.c | 2 | ||||
-rw-r--r-- | java/test/JUnit-interface.txt | 3 | ||||
-rw-r--r-- | java/test/TestH5PL.java | 30 |
25 files changed, 359 insertions, 22 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index e8ed233..03d7b6b 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -7200,6 +7200,88 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native int H5PLget_loading_state() throws HDF5LibraryException; + /** + * H5PLappend inserts the plugin path at the end of the table. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLappend(String plugin_path) throws HDF5LibraryException; + + /** + * H5PLprepend inserts the plugin path at the beginning of the table. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLprepend(String plugin_path) throws HDF5LibraryException; + + /** + * H5PLreplace replaces the plugin path at the specified index. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * @param index + * IN: The table index (0-based). + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLreplace(String plugin_path, int index) throws HDF5LibraryException; + + /** + * H5PLinsert inserts the plugin path at the specified index. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * @param index + * IN: The table index (0-based). + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLinsert(String plugin_path, int index) throws HDF5LibraryException; + + /** + * H5PLremove removes the plugin path at the specified index. + * + * @param index + * IN: The table index (0-based). + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLremove(int index) throws HDF5LibraryException; + + /** + * H5PLget retrieves the plugin path at the specified index. + * + * @param index + * IN: The table index (0-based). + * + * @return the current path at the index in plugin path table + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native String H5PLget(int index) throws HDF5LibraryException; + + /** + * H5PLsize retrieves the size of the current list of plugin paths. + * + * @return the current number of paths in the plugin path table + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5PLsize() throws HDF5LibraryException; + // //////////////////////////////////////////////////////////// // // // H5R: HDF5 1.8 Reference API Functions // diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index 564a764..05c193f 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 1aed6c4..cd1c2f0 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5Imp.c b/java/src/jni/h5Imp.c index 07c9844..2eeb075 100644 --- a/java/src/jni/h5Imp.c +++ b/java/src/jni/h5Imp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index a0c5546..26ec4fc 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 31e9ea2..d869601 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 1c6d4f0..24ddcbc 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 0053770..8cf5252 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5gImp.c b/java/src/jni/h5gImp.c index 7bfa162..41ec382 100644 --- a/java/src/jni/h5gImp.c +++ b/java/src/jni/h5gImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5iImp.c b/java/src/jni/h5iImp.c index a070ed6..47574ca 100644 --- a/java/src/jni/h5iImp.c +++ b/java/src/jni/h5iImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index 0bf1de5..2970e14 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index a94f209..bf2d7b1 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index f5c0702..e8abead 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index 4050811..df8b3c9 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 5adb4b9..5a2d3ba 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ @@ -59,6 +59,167 @@ Java_hdf_hdf5lib_H5_H5PLget_1loading_1state return (jint)plugin_type; } /* end Java_hdf_hdf5lib_H5_H5PLget_1loading_1state */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLappend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLappend + (JNIEnv *env, jclass clss, jobjectArray plugin_path) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLappend(aName); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLappend */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLprepend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLprepend + (JNIEnv *env, jclass clss, jobjectArray plugin_path) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLprepend(aName); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLprepend */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLreplace + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLreplace + (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLreplace(aName, index); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLreplace */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLinsert + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLinsert + (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLinsert(aName, index); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLinsert */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLremove + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLremove + (JNIEnv *env, jclass clss, jint index) +{ + if (H5PLremove(index) < 0) + h5libraryError(env); +} /* end Java_hdf_hdf5lib_H5_H5PLremove */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLget + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_hdf_hdf5lib_H5_H5PLget + (JNIEnv *env, jclass clss, jint index) +{ + char *aName; + jstring str = NULL; + ssize_t buf_size; + + /* get the length of the name */ + buf_size = H5PLget(index, NULL, 0); + + if (buf_size <= 0) { + h5badArgument(env, "H5PLget: buf_size <= 0"); + } /* end if */ + else { + buf_size++; /* add extra space for the null terminator */ + aName = (char*)HDmalloc(sizeof(char) * (size_t)buf_size); + if (aName == NULL) { + h5outOfMemory(env, "H5PLget: malloc failed"); + } /* end if */ + else { + buf_size = H5PLget(index, aName, (size_t)buf_size); + if (buf_size < 0) { + h5libraryError(env); + } /* end if */ + else { + str = ENVPTR->NewStringUTF(ENVPAR aName); + } + HDfree(aName); + } + } + return str; +} /* end Java_hdf_hdf5lib_H5_H5PLget */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLsize + * Signature: (V)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5PLsize + (JNIEnv *env, jclass clss) +{ + int retVal = -1; + + retVal = H5PLsize(); + if (retVal < 0) + h5libraryError(env); + + return (jint)retVal; +} /* end Java_hdf_hdf5lib_H5_H5PLsize */ + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5plImp.h b/java/src/jni/h5plImp.h index 901f02e..5336621 100644 --- a/java/src/jni/h5plImp.h +++ b/java/src/jni/h5plImp.h @@ -39,6 +39,69 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5PLget_1loading_1state (JNIEnv *, jclass); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLappend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLappend + (JNIEnv *, jclass, jobjectArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLprepend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLprepend + (JNIEnv *, jclass, jobjectArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLreplace + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLreplace + (JNIEnv *, jclass, jobjectArray, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLinsert + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLinsert + (JNIEnv *, jclass, jobjectArray, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLremove + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLremove + (JNIEnv *, jclass, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLget + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_hdf_hdf5lib_H5_H5PLget + (JNIEnv *, jclass, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLsize + * Signature: (V)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5PLsize + (JNIEnv *, jclass); + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c index 15720ae..b250550 100644 --- a/java/src/jni/h5rImp.c +++ b/java/src/jni/h5rImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ #ifdef __cplusplus diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 84db125..c578ab8 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c index 212ce84..7b4af56 100644 --- a/java/src/jni/h5tImp.c +++ b/java/src/jni/h5tImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index aa2b529..8454815 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index 4d3e201..434a107 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5zImp.c b/java/src/jni/h5zImp.c index e569870..a5e6cd8 100644 --- a/java/src/jni/h5zImp.c +++ b/java/src/jni/h5zImp.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/nativeData.c b/java/src/jni/nativeData.c index 5d07abb..33f4953 100644 --- a/java/src/jni/nativeData.c +++ b/java/src/jni/nativeData.c @@ -13,7 +13,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ /* diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt index cae8cef..ab2f3b1 100644 --- a/java/test/JUnit-interface.txt +++ b/java/test/JUnit-interface.txt @@ -633,13 +633,14 @@ JUnit version 4.11 .testH5Ocomment_clear .testH5Ocopy_cur_not_exists .TestH5PLplugins +.TestH5PLpaths .testH5Zfilter_avail .testH5Zunregister_predefined .testH5Zget_filter_info Time: XXXX -OK (637 tests) +OK (638 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/TestH5PL.java b/java/test/TestH5PL.java index ad3dc34..aa59478 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -67,6 +67,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; |