diff --git a/tests/io_dset_float.c b/tests/io_dset_float.c index 693f139..f07cfe8 100644 --- a/tests/io_dset_float.c +++ b/tests/io_dset_float.c @@ -31,6 +31,10 @@ static int test_write_dset (const char* file_name, const back_end_t backend) { // open file in 'write' mode file = trexio_open(file_name, 'w', backend, &rc); + if (rc != TREXIO_SUCCESS) { + printf("%s\n", trexio_string_of_error(rc)); + } + assert (rc == TREXIO_SUCCESS); assert (file != NULL); // write numerical attribute in an empty file diff --git a/tests/io_dset_float_text.c b/tests/io_dset_float_text.c index 69392e8..84eb58a 100644 --- a/tests/io_dset_float_text.c +++ b/tests/io_dset_float_text.c @@ -1,4 +1,4 @@ -#define TEST_BACKEND_HDF5 +#define TEST_BACKEND_TEXT #define TREXIO_FILE_PREFIX "io_dset_float" #include "test_macros.h" #include "io_dset_float.c" diff --git a/tests/io_dset_int_text.c b/tests/io_dset_int_text.c index 0f7bbee..81f4592 100644 --- a/tests/io_dset_int_text.c +++ b/tests/io_dset_int_text.c @@ -1,4 +1,4 @@ -#define TEST_BACKEND_HDF5 +#define TEST_BACKEND_TEXT #define TREXIO_FILE_PREFIX "io_dset_int" #include "test_macros.h" #include "io_dset_int.c" diff --git a/tests/io_dset_sparse.c b/tests/io_dset_sparse.c index 575210f..4b19672 100644 --- a/tests/io_dset_sparse.c +++ b/tests/io_dset_sparse.c @@ -46,7 +46,7 @@ static int test_write_dset_sparse (const char* file_name, const back_end_t backe uint64_t chunk_size = (uint64_t) size/N_CHUNKS; chunk_size = chunk_size > 0 ? chunk_size : (uint64_t) size; int n_chunks = size/chunk_size; - printf("chunk_size = %lld\n", chunk_size); + printf("chunk_size = %ld\n", (long) chunk_size); printf("n_chunks = %d\n", n_chunks); uint64_t offset_f = 0UL + offset; @@ -55,7 +55,7 @@ static int test_write_dset_sparse (const char* file_name, const back_end_t backe // write n_chunks times using write_sparse while(offset_d < size) { if (offset_d+chunk_size > size) chunk_size = size-offset_d; - printf("chunk_size = %lld\n", chunk_size); + printf("chunk_size = %ld\n", (long) chunk_size); if (chunk_size == 0L) break; rc = trexio_write_mo_2e_int_eri(file, offset_f, chunk_size, &index[4*offset_d], &value[offset_d]); printf("%5d: %s\n", __LINE__, trexio_string_of_error(rc)); @@ -163,7 +163,7 @@ static int test_read_dset_sparse (const char* file_name, const back_end_t backen printf("%5d: %s\n", __LINE__, trexio_string_of_error(rc)); /* for (int i=0 ; i