1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-23 04:43:57 +01:00

modify the test to fail when appending on non-existing file

This commit is contained in:
q-posev 2021-03-04 09:41:27 +01:00
parent 9494f02e37
commit a3e2a3920d

View File

@ -120,15 +120,11 @@ int test_h5read() {
file2 = trexio_open(file_name2, 'r', TREXIO_HDF5);
assert (file2 == NULL);
// test appending non-existing file, should create it
const char* file_name3 = "test_append.h5";
// test appending non-existing file, should fail and return NULL
trexio_t* file3 = NULL;
file3 = trexio_open(file_name3, 'a', TREXIO_HDF5);
assert (file3 != NULL);
rc = trexio_close(file3);
assert (rc == TREXIO_SUCCESS);
file3 = trexio_open(file_name2, 'a', TREXIO_HDF5);
assert (file3 == NULL);
free(coord);