mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 20:35:44 +01:00
add test for append in h5
This commit is contained in:
parent
886a3d2162
commit
ccf03370f7
12
src/test.c
12
src/test.c
@ -59,6 +59,18 @@ int test_h5write() {
|
||||
rc = trexio_write_nucleus_num(file,25);
|
||||
assert (rc != TREXIO_SUCCESS);
|
||||
|
||||
// close current session
|
||||
rc = trexio_close(file);
|
||||
assert (rc == TREXIO_SUCCESS);
|
||||
|
||||
file = trexio_open(file_name, 'a', TREXIO_HDF5);
|
||||
assert (file != NULL);
|
||||
|
||||
// works: try to read the nucleus_num from existing file
|
||||
rc = trexio_read_nucleus_num(file,&num);
|
||||
assert (rc == TREXIO_SUCCESS);
|
||||
assert (num == 12);
|
||||
|
||||
// works: try to rewrite the nucleus_coord
|
||||
coord[0] = 666.666;
|
||||
rc = trexio_write_nucleus_coord(file,coord);
|
||||
|
Loading…
Reference in New Issue
Block a user