diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-12-07 21:05:08 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-12-07 21:05:08 (GMT) |
commit | 1d3186ad45151bd1dd50a3053410d17f4edbfe93 (patch) | |
tree | d0be37df90e27bb887f06987c8b436f7e29a843d /java | |
parent | 972cf8e60c7b96a20d046e2a2104f16f06ae2d7b (diff) | |
download | hdf5-1d3186ad45151bd1dd50a3053410d17f4edbfe93.zip hdf5-1d3186ad45151bd1dd50a3053410d17f4edbfe93.tar.gz hdf5-1d3186ad45151bd1dd50a3053410d17f4edbfe93.tar.bz2 |
HDFFV-10876 ignore old reference API tests
Diffstat (limited to 'java')
-rw-r--r-- | java/test/TestH5.java | 2 | ||||
-rw-r--r-- | java/test/TestH5R.java | 45 | ||||
-rw-r--r-- | java/test/testfiles/JUnit-TestH5R.txt | 19 |
3 files changed, 26 insertions, 40 deletions
diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 3021ed2..9b2a1d3 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -409,6 +409,6 @@ public class TestH5 { for(int col = 0; col < DIM_Y; col++) { assertTrue("H5export_dataset: <"+row+","+col+">"+dset_indata[row][col]+"=99", dset_indata[row][col]==99); } -// _deleteH5file(); + _deleteH5file(); } } diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index d434738..ba16e9b 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -14,6 +14,7 @@ package test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -28,6 +29,7 @@ import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; 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; @@ -54,8 +56,9 @@ public class TestH5R { catch (Throwable err) {} if (file.exists()) { - try {file.delete();} catch (SecurityException e) {} + try {file.delete();} catch (SecurityException e) {e.printStackTrace();} } + assertFalse("TestH5R._deleteFile file still exists ", file.exists()); } private final long _createDataset(long fid, long dsid, String name, long dapl) { @@ -149,7 +152,7 @@ public class TestH5R { // Test v1.8 APIs params - @Test + @Ignore public void testH5Rget_name() { long loc_id = H5fid; int ref_type = HDF5Constants.H5R_OBJECT; @@ -178,7 +181,7 @@ public class TestH5R { assertTrue("The name of the object: ", objName.equals(name[0])); } - @Test + @Ignore public void testH5Rget_obj_type2() { int ref_type=HDF5Constants.H5R_OBJECT; byte[] ref=null; @@ -203,7 +206,7 @@ public class TestH5R { assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET); } - @Test + @Ignore public void testH5Rcreate_refobj() { byte[] ref = null; @@ -217,7 +220,7 @@ public class TestH5R { assertNotNull(ref); } - @Test + @Ignore public void testH5Rcreate_regionrefobj() { byte[] ref = null; try { @@ -230,7 +233,7 @@ public class TestH5R { assertNotNull(ref); } - @Test + @Ignore public void testH5Rdereference() { byte[] ref1 = null; byte[] ref2 = null; @@ -259,7 +262,7 @@ public class TestH5R { } } - @Test + @Ignore public void testH5Rget_region() { byte[] ref = null; long dsid = -1; @@ -278,7 +281,7 @@ public class TestH5R { } } - @Test(expected = IllegalArgumentException.class) + @Ignore//(expected = IllegalArgumentException.class) public void testH5Rget_name_Invalidreftype() throws Throwable { byte[] ref = null; String[] name = {""}; @@ -286,62 +289,62 @@ public class TestH5R { H5.H5Rget_name(H5fid, HDF5Constants.H5R_DATASET_REGION, ref, name, 16); } - @Test(expected = NullPointerException.class) + @Ignore//(expected = NullPointerException.class) public void testH5Rget_name_NULLreference() throws Throwable { byte[] ref = null; String[] name = {""}; H5.H5Rget_name(H5fid, HDF5Constants.H5R_OBJECT, ref, name, 16); } - @Test(expected = HDF5LibraryException.class) + @Ignore//(expected = HDF5LibraryException.class) public void testH5Rget_obj_type2_Invalidreftype() throws Throwable { byte[] ref = null; ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); H5.H5Rget_obj_type(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); } - @Test(expected = HDF5LibraryException.class) + @Ignore//(expected = HDF5LibraryException.class) public void testH5Rcreate_InvalidObjectName() throws Throwable { - H5.H5Rcreate(H5fid, "/GROUPS", HDF5Constants.H5R_OBJECT, -1); + byte[] ref=H5.H5Rcreate(H5fid, "/GROUPS", HDF5Constants.H5R_OBJECT, -1); } - @Test(expected = HDF5LibraryException.class) + @Ignore//(expected = HDF5LibraryException.class) public void testH5Rcreate_Invalidspace_id() throws Throwable { - H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, -1); + byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, -1); } - @Test(expected = IllegalArgumentException.class) + @Ignore//(expected = IllegalArgumentException.class) public void testH5Rcreate_Invalidreftype() throws Throwable { - H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_BADTYPE, -1); + byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_BADTYPE, -1); } - @Test(expected = IllegalArgumentException.class) + @Ignore//(expected = IllegalArgumentException.class) public void testH5Rgetregion_Invalidreftype() throws Throwable { byte[] ref = null; ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, H5dsid); H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); } - @Test(expected = IllegalArgumentException.class) + @Ignore//(expected = IllegalArgumentException.class) public void testH5Rgetregion_Badreferencetype() throws Throwable { byte[] ref = null; ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, H5dsid); H5.H5Rget_region(H5fid, HDF5Constants.H5R_OBJECT, ref); } - @Test(expected = NullPointerException.class) + @Ignore//(expected = NullPointerException.class) public void testH5Rgetregion_Nullreference() throws Throwable { byte[] ref = null; H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); } - @Test(expected = NullPointerException.class) + @Ignore//(expected = NullPointerException.class) public void testH5Rdereference_Nullreference() throws Throwable { byte[] ref = null; H5.H5Rdereference(H5did2, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref); } - @Test(expected = IllegalArgumentException.class) + @Ignore//(expected = IllegalArgumentException.class) public void testH5Rdereference_Invalidreference() throws Throwable { byte[] ref1 = null; byte[] ref2 = null; diff --git a/java/test/testfiles/JUnit-TestH5R.txt b/java/test/testfiles/JUnit-TestH5R.txt index daa81c5..a96fbb4 100644 --- a/java/test/testfiles/JUnit-TestH5R.txt +++ b/java/test/testfiles/JUnit-TestH5R.txt @@ -1,35 +1,18 @@ JUnit version 4.11 .testH5Ropen_attr_Nullref -.testH5Rgetregion_Nullreference -.testH5Rget_obj_type2_Invalidreftype -.testH5Rdereference .testH5Rget_attr_name_Nullref .testH5Ropen_region_Nullref .testH5Requal_Nullref1 .testH5Requal_Nullref2 -.testH5Rget_name .testH5Rget_object -.testH5Rcreate_Invalidreftype -.testH5Rget_name_NULLreference -.testH5Rget_region -.testH5Rdereference_Nullreference -.testH5Rcreate_refobj -.testH5Rcreate_Invalidspace_id -.testH5Rdereference_Invalidreference -.testH5Rgetregion_Badreferencetype .testH5Rget_obj_type3_Nullref -.testH5Rcreate_regionrefobj .testH5Ropen_object_Nullref .testH5Rdestroy_Nullref -.testH5Rget_name_Invalidreftype -.testH5Rgetregion_Invalidreftype .testH5Rcreate_object_Nullname -.testH5Rget_obj_type2 .testH5Rget_obj_type3 .testH5Rget_name_Invalidloc .testH5Rcopy_Nullref1 .testH5Rcreate_attr_Invalidloc -.testH5Rcreate_InvalidObjectName .testH5Rget_file_name_Nullref .testH5Rget_obj_name_Nullref .testH5Rcreate_region_Nullname @@ -41,5 +24,5 @@ JUnit version 4.11 Time: XXXX -OK (39 tests) +OK (22 tests) |