mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-24 22:21:43 +02:00
modify the test to fail when appending on non-existing file
This commit is contained in:
parent
9494f02e37
commit
a3e2a3920d
10
src/test.c
10
src/test.c
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user