|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectTestCase
test.unittests.H5BugFixTest
public class H5BugFixTest
TestCase for bug fixes.
This class tests all the public methods in H5CompoundDS class.
The test file contains the following objects.
/dataset_byte Dataset {50, 10}
/dataset_comp Dataset {50, 10}
/dataset_enum Dataset {50, 10}
/dataset_float Dataset {50, 10}
/dataset_image Dataset {50, 10}
/dataset_int Dataset {50, 10}
/dataset_str Dataset {50, 10}
/g0 Group
/g0/dataset_comp Dataset {50, 10}
/g0/dataset_int Dataset {50, 10}
/g0/datatype_float Type
/g0/datatype_int Type
/g0/datatype_str Type
/g0/g00 Group
/g0/g00/dataset_float Dataset {50, 10}
/g0_attr Group
| Constructor Summary | |
|---|---|
H5BugFixTest(java.lang.String arg0)
|
|
| Method Summary | |
|---|---|
protected void |
setUp()
|
protected void |
tearDown()
|
void |
testBug847()
The following program fails because dataset.init() does not reset the selection of dataspace. |
void |
testBug863()
The following operation causes memory leak because a group is left open at file.get(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public H5BugFixTest(java.lang.String arg0)
arg0 - | Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
java.lang.Exception
protected void tearDown()
throws java.lang.Exception
java.lang.Exception
public final void testBug847()
throws java.lang.Exception
The bug appears on hdf-java 2.4 beta04 or earlier version. It is fixed at later version.
1) read the table cell (using dataset selection to select only that row of the table)
2) re-initialize the Dataset
3) call 'Dataset.clearData()'
4) call 'Dataset.getData()'
5) change the correct column/row **
6) call 'Dataset.write()'
7) close the file
8) reopen the file and read the table cell as in step 1
9) assert that the value has been changed and is correct
This sequence of actions works correctly on the hdf-java library built for
64-bit solaris that we received in August 2006. On the latest (beta-d), This
fails when attempting to change the value of the 1st and 4th rows (however, it
works for the 0th row).
java.lang.Exception
public final void testBug863()
throws java.lang.Exception
The bug appears on hdf-java 2.4 beta05 or earlier version. It is fixed at later version.
while (true)
{
H5File file = new H5File(H5TestFile.NAME_FILE_H5, H5File.READ);
//file.open();
file.get("/Table0");
file.get("/Group0");
int n = H5.H5Fget_obj_count(file.getFID(), HDF5Constants.H5F_OBJ_ALL);
if (n>1)
System.out.println("*** Possible memory leak!!!");
file.close();
}
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||