diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-12-08 20:03:05 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-12-08 20:03:05 (GMT) |
commit | 1cde6b2fbabebb966cb8958ef4d81ae27cc83025 (patch) | |
tree | 2622b009e1d1363a1d2223e32829b7033784d485 /java/test | |
parent | 349656ecba5c3eff593633edd7736dc8f7427333 (diff) | |
download | hdf5-1cde6b2fbabebb966cb8958ef4d81ae27cc83025.zip hdf5-1cde6b2fbabebb966cb8958ef4d81ae27cc83025.tar.gz hdf5-1cde6b2fbabebb966cb8958ef4d81ae27cc83025.tar.bz2 |
Remove problem tests for now
Diffstat (limited to 'java/test')
-rw-r--r-- | java/test/TestH5R.java | 304 |
1 files changed, 102 insertions, 202 deletions
diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index ba16e9b..2555db1 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -151,208 +151,108 @@ public class TestH5R { } // Test v1.8 APIs params - - @Ignore - public void testH5Rget_name() { - long loc_id = H5fid; - int ref_type = HDF5Constants.H5R_OBJECT; - long ret_val = -1; - byte[] ref = null; - String[] name = {""}; - String objName = "/dset"; - - try { - ref = H5.H5Rcreate(H5fid, objName, ref_type, -1); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Rget_name:H5Rcreate " + err); - } - - try { - ret_val = H5.H5Rget_name(loc_id, ref_type, ref, name, 16); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Rget_name: " + err); - } - - assertTrue("testH5Rget_name: H5Rget_name", ret_val>0); - assertTrue("The name of the object: ", objName.equals(name[0])); - } - - @Ignore - public void testH5Rget_obj_type2() { - int ref_type=HDF5Constants.H5R_OBJECT; - byte[] ref=null; - - String objName = "/dset"; - int obj_type = -1; - - try { - ref = H5.H5Rcreate(H5fid, objName, ref_type, -1); - } - catch(Throwable err) { - err.printStackTrace(); - } - - try { - obj_type = H5.H5Rget_obj_type(H5fid, HDF5Constants.H5R_OBJECT, ref); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Rget_obj_type2: " + err); - } - assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET); - } - - @Ignore - public void testH5Rcreate_refobj() { - byte[] ref = null; - - try { - ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Rcreate: " + err); - } - assertNotNull(ref); - } - - @Ignore - public void testH5Rcreate_regionrefobj() { - byte[] ref = null; - try { - ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Rcreate: " + err); - } - assertNotNull(ref); - } - - @Ignore - public void testH5Rdereference() { - byte[] ref1 = null; - byte[] ref2 = null; - long dataset_id = -1; - long group_id = -1; - try { - //Create reference on dataset - ref1 = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); - dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1); - - //Create reference on group - ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); - group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2); - assertNotNull(ref1); - assertNotNull(ref2); - assertTrue(dataset_id >= 0); - assertTrue(group_id >= 0); - } - catch (Throwable err) { - err.printStackTrace(); - fail("TestH5Rdereference " + err); - } - finally { - try {H5.H5Dclose(dataset_id);} catch (Exception ex) {} - try {H5.H5Gclose(group_id);} catch (Exception ex) {} - } - } - - @Ignore - public void testH5Rget_region() { - byte[] ref = null; - long dsid = -1; - try { - ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); - dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); - assertNotNull(ref); - assertTrue(dsid >= 0); - } - catch (Throwable err) { - err.printStackTrace(); - fail("TestH5Rget_region: " + err); - } - finally { - try {H5.H5Sclose(dsid);} catch (Exception ex) {} - } - } - - @Ignore//(expected = IllegalArgumentException.class) - public void testH5Rget_name_Invalidreftype() throws Throwable { - byte[] ref = null; - String[] name = {""}; - ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); - H5.H5Rget_name(H5fid, HDF5Constants.H5R_DATASET_REGION, ref, name, 16); - } - - @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); - } - - @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); - } - - @Ignore//(expected = HDF5LibraryException.class) - public void testH5Rcreate_InvalidObjectName() throws Throwable { - byte[] ref=H5.H5Rcreate(H5fid, "/GROUPS", HDF5Constants.H5R_OBJECT, -1); - } - - @Ignore//(expected = HDF5LibraryException.class) - public void testH5Rcreate_Invalidspace_id() throws Throwable { - byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, -1); - } - - @Ignore//(expected = IllegalArgumentException.class) - public void testH5Rcreate_Invalidreftype() throws Throwable { - byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_BADTYPE, -1); - } - - @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); - } - - @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); - } - - @Ignore//(expected = NullPointerException.class) - public void testH5Rgetregion_Nullreference() throws Throwable { - byte[] ref = null; - H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); - } - - @Ignore//(expected = NullPointerException.class) - public void testH5Rdereference_Nullreference() throws Throwable { - byte[] ref = null; - H5.H5Rdereference(H5did2, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref); - } - - @Ignore//(expected = IllegalArgumentException.class) - public void testH5Rdereference_Invalidreference() throws Throwable { - byte[] ref1 = null; - byte[] ref2 = null; - ref1 = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); - ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); - H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref1); - } - + /* + * @Ignore public void testH5Rget_name() { long loc_id = H5fid; int ref_type = + * HDF5Constants.H5R_OBJECT; long ret_val = -1; byte[] ref = null; String[] name = {""}; String + * objName = "/dset"; + * + * try { ref = H5.H5Rcreate(H5fid, objName, ref_type, -1); } catch (Throwable err) { + * err.printStackTrace(); fail("H5.H5Rget_name:H5Rcreate " + err); } + * + * try { ret_val = H5.H5Rget_name(loc_id, ref_type, ref, name, 16); } catch (Throwable err) { + * err.printStackTrace(); fail("H5.H5Rget_name: " + err); } + * + * assertTrue("testH5Rget_name: H5Rget_name", ret_val>0); assertTrue("The name of the object: ", + * objName.equals(name[0])); } + * + * @Ignore public void testH5Rget_obj_type2() { int ref_type=HDF5Constants.H5R_OBJECT; byte[] + * ref=null; + * + * String objName = "/dset"; int obj_type = -1; + * + * try { ref = H5.H5Rcreate(H5fid, objName, ref_type, -1); } catch(Throwable err) { + * err.printStackTrace(); } + * + * try { obj_type = H5.H5Rget_obj_type(H5fid, HDF5Constants.H5R_OBJECT, ref); } catch (Throwable + * err) { err.printStackTrace(); fail("H5.H5Rget_obj_type2: " + err); } assertEquals(obj_type, + * HDF5Constants.H5O_TYPE_DATASET); } + * + * @Ignore public void testH5Rcreate_refobj() { byte[] ref = null; + * + * try { ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); } catch (Throwable err) { + * err.printStackTrace(); fail("H5.H5Rcreate: " + err); } assertNotNull(ref); } + * + * @Ignore public void testH5Rcreate_regionrefobj() { byte[] ref = null; try { ref = + * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); } catch (Throwable err) { + * err.printStackTrace(); fail("H5.H5Rcreate: " + err); } assertNotNull(ref); } + * + * @Ignore public void testH5Rdereference() { byte[] ref1 = null; byte[] ref2 = null; long + * dataset_id = -1; long group_id = -1; try { //Create reference on dataset ref1 = + * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); dataset_id= + * H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1); + * + * //Create reference on group ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); + * group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2); + * assertNotNull(ref1); assertNotNull(ref2); assertTrue(dataset_id >= 0); assertTrue(group_id >= 0); + * } catch (Throwable err) { err.printStackTrace(); fail("TestH5Rdereference " + err); } finally { + * try {H5.H5Dclose(dataset_id);} catch (Exception ex) {} try {H5.H5Gclose(group_id);} catch + * (Exception ex) {} } } + * + * @Ignore public void testH5Rget_region() { byte[] ref = null; long dsid = -1; try { ref = + * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); dsid = + * H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); assertNotNull(ref); + * assertTrue(dsid >= 0); } catch (Throwable err) { err.printStackTrace(); + * fail("TestH5Rget_region: " + err); } finally { try {H5.H5Sclose(dsid);} catch (Exception ex) {} } + * } + * + * @Ignore//(expected = IllegalArgumentException.class) public void testH5Rget_name_Invalidreftype() + * throws Throwable { byte[] ref = null; String[] name = {""}; ref = H5.H5Rcreate(H5fid, "/dset", + * HDF5Constants.H5R_OBJECT, -1); H5.H5Rget_name(H5fid, HDF5Constants.H5R_DATASET_REGION, ref, name, + * 16); } + * + * @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); } + * + * @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); } + * + * @Ignore//(expected = HDF5LibraryException.class) public void testH5Rcreate_InvalidObjectName() + * throws Throwable { byte[] ref=H5.H5Rcreate(H5fid, "/GROUPS", HDF5Constants.H5R_OBJECT, -1); } + * + * @Ignore//(expected = HDF5LibraryException.class) public void testH5Rcreate_Invalidspace_id() + * throws Throwable { byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, -1); + * } + * + * @Ignore//(expected = IllegalArgumentException.class) public void testH5Rcreate_Invalidreftype() + * throws Throwable { byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_BADTYPE, -1); } + * + * @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); } + * + * @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); } + * + * @Ignore//(expected = NullPointerException.class) public void testH5Rgetregion_Nullreference() + * throws Throwable { byte[] ref = null; H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, + * ref); } + * + * @Ignore//(expected = NullPointerException.class) public void testH5Rdereference_Nullreference() + * throws Throwable { byte[] ref = null; H5.H5Rdereference(H5did2, HDF5Constants.H5P_DEFAULT, + * HDF5Constants.H5R_OBJECT, ref); } + * + * @Ignore//(expected = IllegalArgumentException.class) public void + * testH5Rdereference_Invalidreference() throws Throwable { byte[] ref1 = null; byte[] ref2 = null; + * ref1 = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); ref2 = + * H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); H5.H5Rdereference(H5gid, + * HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref1); } + */ // Test v1.12 APIs params @Test |