summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5Z.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/TestH5Z.java')
-rw-r--r--java/test/TestH5Z.java58
1 files changed, 38 insertions, 20 deletions
diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java
index fde8f1a..bc6bfc0 100644
--- a/java/test/TestH5Z.java
+++ b/java/test/TestH5Z.java
@@ -14,6 +14,7 @@ package test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
@@ -25,20 +26,24 @@ import org.junit.Test;
import org.junit.rules.TestName;
public class TestH5Z {
- @Rule public TestName testname = new TestName();
+ @Rule
+ public TestName testname = new TestName();
@Before
- public void checkOpenIDs() {
- assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0);
+ public void checkOpenIDs()
+ {
+ assertTrue("H5 open ids is 0", H5.getOpenIDCount() == 0);
System.out.print(testname.getMethodName());
}
@After
- public void nextTestName() {
+ public void nextTestName()
+ {
System.out.println();
}
@Test
- public void testH5Zfilter_avail() {
+ public void testH5Zfilter_avail()
+ {
try {
int filter_found;
@@ -64,34 +69,46 @@ public class TestH5Z {
}
@Test
- public void testH5Zget_filter_info() {
+ public void testH5Zget_filter_info()
+ {
try {
int filter_flag;
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_FLETCHER32);
- assertTrue("H5.H5Zget_filter_info_FLETCHER32_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_FLETCHER32_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_FLETCHER32_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_FLETCHER32_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_NBIT);
- assertTrue("H5.H5Zget_filter_info_NBIT_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_NBIT_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_NBIT_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_NBIT_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SCALEOFFSET);
- assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_SCALEOFFSET_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SHUFFLE);
- assertTrue("H5.H5Zget_filter_info_DECODE_SHUFFLE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_ENCODE_SHUFFLE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DECODE_SHUFFLE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_ENCODE_SHUFFLE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
- if(1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE)) {
+ if (1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_DEFLATE)) {
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_DEFLATE);
- assertTrue("H5.H5Zget_filter_info_DEFLATE_DECODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
- assertTrue("H5.H5Zget_filter_info_DEFLATE_ENCODE_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DEFLATE_DECODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DEFLATE_ENCODE_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_ENCODE_ENABLED) > 0);
}
- if(1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SZIP)) {
+ if (1 == H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SZIP)) {
filter_flag = H5.H5Zget_filter_info(HDF5Constants.H5Z_FILTER_SZIP);
// Decode should always be available, but we have no way of determining
// if encode is so don't assert on that.
- assertTrue("H5.H5Zget_filter_info_DECODE_SZIP_ENABLED", (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
+ assertTrue("H5.H5Zget_filter_info_DECODE_SZIP_ENABLED",
+ (filter_flag & HDF5Constants.H5Z_FILTER_CONFIG_DECODE_ENABLED) > 0);
}
}
catch (Throwable err) {
@@ -101,7 +118,8 @@ public class TestH5Z {
}
@Test(expected = HDF5LibraryException.class)
- public void testH5Zunregister_predefined() throws Throwable {
+ public void testH5Zunregister_predefined() throws Throwable
+ {
int filter_found = H5.H5Zfilter_avail(HDF5Constants.H5Z_FILTER_SHUFFLE);
assertTrue("H5.H5Zfilter_avail", filter_found > 0);