Brings java wrapper updates from develop

The wrappers compile but fail tests due to some missing develop
functionality
This commit is contained in:
Dana Robinson
2021-05-06 14:07:08 -07:00
parent 457b199a38
commit f2cb86499e
219 changed files with 9672 additions and 2742 deletions

View File

@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -47,17 +46,17 @@ public class TestH5Pfapl {
private static final int DIM_Y = 6;
private static final int DIMF_X = 12;
private static final int DIMF_Y = 18;
long H5fid = -1;
long H5dsid = -1;
long H5did = -1;
long H5Fdsid = -1;
long H5Fdid = -1;
long H5fid = HDF5Constants.H5I_INVALID_HID;
long H5dsid = HDF5Constants.H5I_INVALID_HID;
long H5did = HDF5Constants.H5I_INVALID_HID;
long H5Fdsid = HDF5Constants.H5I_INVALID_HID;
long H5Fdid = HDF5Constants.H5I_INVALID_HID;
long[] H5dims = { DIM_X, DIM_Y };
long fapl_id = -1;
long plapl_id = -1;
long dapl_id = -1;
long plist_id = -1;
long btplist_id = -1;
long fapl_id = HDF5Constants.H5I_INVALID_HID;
long plapl_id = HDF5Constants.H5I_INVALID_HID;
long dapl_id = HDF5Constants.H5I_INVALID_HID;
long plist_id = HDF5Constants.H5I_INVALID_HID;
long btplist_id = HDF5Constants.H5I_INVALID_HID;
long[] H5Fdims = { DIMF_X, DIMF_Y };
double windchillF[][] =
{{36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0},
@@ -130,7 +129,7 @@ public class TestH5Pfapl {
}
private final long _createDataset(long fid, long dsid, String name, long dapl) {
long did = -1;
long did = HDF5Constants.H5I_INVALID_HID;
try {
did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid,
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
@@ -385,7 +384,7 @@ public class TestH5Pfapl {
@Test
public void testH5Pget_elink_fapl() {
long ret_val_id = -1;
long ret_val_id = HDF5Constants.H5I_INVALID_HID;
try {
ret_val_id = H5.H5Pget_elink_fapl(plapl_id);
assertTrue("H5Pget_elink_fapl", ret_val_id >= 0);
@@ -403,7 +402,7 @@ public class TestH5Pfapl {
@Test
public void testH5P_elink_fapl() {
long ret_val_id = -1;
long ret_val_id = HDF5Constants.H5I_INVALID_HID;
try {
H5.H5Pset_elink_fapl(plapl_id, fapl_id );
ret_val_id = H5.H5Pget_elink_fapl(plapl_id);
@@ -421,7 +420,7 @@ public class TestH5Pfapl {
@Test
public void testH5P_elink_file_cache_size() {
long elink_fapl_id = -1;
long elink_fapl_id = HDF5Constants.H5I_INVALID_HID;
int efc_size = 0;
try {
H5.H5Pset_elink_fapl(plapl_id, fapl_id );
@@ -1398,4 +1397,36 @@ public class TestH5Pfapl {
fail("H5P_evict_on_close: " + err);
}
}
@Test
public void testH5P_file_locking() {
boolean use_file_locking = false;
boolean ignore_disabled_file_locking = false;
try {
// false values (usually not the default)
H5.H5Pset_file_locking(fapl_id, false, false);
use_file_locking = H5.H5Pget_use_file_locking(fapl_id);
ignore_disabled_file_locking = H5.H5Pget_ignore_disabled_file_locking(fapl_id);
assertFalse("H5P_file_locking", use_file_locking);
assertFalse("H5P_file_locking", ignore_disabled_file_locking);
// true values (typically the default)
H5.H5Pset_file_locking(fapl_id, true, true);
use_file_locking = H5.H5Pget_use_file_locking(fapl_id);
ignore_disabled_file_locking = H5.H5Pget_ignore_disabled_file_locking(fapl_id);
assertTrue("H5P_file_locking", use_file_locking);
assertTrue("H5P_file_locking", ignore_disabled_file_locking);
}
catch (HDF5PropertyListInterfaceException err) {
// parallel is not supported
if (err.getMinorErrorNumber() != HDF5Constants.H5E_UNSUPPORTED) {
err.printStackTrace();
fail("H5P_test_file_locking: " + err);
}
}
catch (Throwable err) {
err.printStackTrace();
fail("H5P_test_file_locking: " + err);
}
}
}