diff --git a/tests/io_dset_int_hdf5.c b/tests/io_dset_int_hdf5.c index 63d9db1..7d9e1a6 100644 --- a/tests/io_dset_int_hdf5.c +++ b/tests/io_dset_int_hdf5.c @@ -16,7 +16,7 @@ static int test_write_dset (const char* file_name, const back_end_t backend) { // parameters to be written int num = 12; - int nucl_index[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; + int nucl_index[12] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; /*================= START OF TEST ==================*/ @@ -99,7 +99,7 @@ static int test_read_dset (const char* file_name, const back_end_t backend) { nucl_index = (int*) calloc(num, sizeof(int)); rc = trexio_read_basis_nucleus_index(file, nucl_index); assert (rc == TREXIO_SUCCESS); - assert ( nucl_index[num-1] == num ); + assert (nucl_index[num-1] == num-1); free(nucl_index); @@ -125,7 +125,7 @@ int main(void) { test_has_dset (TREXIO_FILE, TEST_BACKEND); test_read_dset (TREXIO_FILE, TEST_BACKEND); - //rc = system(RM_COMMAND); + rc = system(RM_COMMAND); assert (rc == 0); return 0; diff --git a/tests/io_dset_int_text.c b/tests/io_dset_int_text.c index 60f5558..1544327 100644 --- a/tests/io_dset_int_text.c +++ b/tests/io_dset_int_text.c @@ -16,7 +16,7 @@ static int test_write_dset (const char* file_name, const back_end_t backend) { // parameters to be written int num = 12; - int nucl_index[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; + int nucl_index[12] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; /*================= START OF TEST ==================*/ @@ -99,7 +99,7 @@ static int test_read_dset (const char* file_name, const back_end_t backend) { nucl_index = (int*) calloc(num, sizeof(int)); rc = trexio_read_basis_nucleus_index(file, nucl_index); assert (rc == TREXIO_SUCCESS); - assert ( nucl_index[num-1] == num ); + assert (nucl_index[num-1] == num-1); free(nucl_index);