mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
shift values in the basic_nucleus_index array
This commit is contained in:
parent
6637cfd6ce
commit
58c6de9963
@ -16,7 +16,7 @@ static int test_write_dset (const char* file_name, const back_end_t backend) {
|
|||||||
|
|
||||||
// parameters to be written
|
// parameters to be written
|
||||||
int num = 12;
|
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 ==================*/
|
/*================= 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));
|
nucl_index = (int*) calloc(num, sizeof(int));
|
||||||
rc = trexio_read_basis_nucleus_index(file, nucl_index);
|
rc = trexio_read_basis_nucleus_index(file, nucl_index);
|
||||||
assert (rc == TREXIO_SUCCESS);
|
assert (rc == TREXIO_SUCCESS);
|
||||||
assert ( nucl_index[num-1] == num );
|
assert (nucl_index[num-1] == num-1);
|
||||||
|
|
||||||
free(nucl_index);
|
free(nucl_index);
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ int main(void) {
|
|||||||
test_has_dset (TREXIO_FILE, TEST_BACKEND);
|
test_has_dset (TREXIO_FILE, TEST_BACKEND);
|
||||||
test_read_dset (TREXIO_FILE, TEST_BACKEND);
|
test_read_dset (TREXIO_FILE, TEST_BACKEND);
|
||||||
|
|
||||||
//rc = system(RM_COMMAND);
|
rc = system(RM_COMMAND);
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -16,7 +16,7 @@ static int test_write_dset (const char* file_name, const back_end_t backend) {
|
|||||||
|
|
||||||
// parameters to be written
|
// parameters to be written
|
||||||
int num = 12;
|
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 ==================*/
|
/*================= 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));
|
nucl_index = (int*) calloc(num, sizeof(int));
|
||||||
rc = trexio_read_basis_nucleus_index(file, nucl_index);
|
rc = trexio_read_basis_nucleus_index(file, nucl_index);
|
||||||
assert (rc == TREXIO_SUCCESS);
|
assert (rc == TREXIO_SUCCESS);
|
||||||
assert ( nucl_index[num-1] == num );
|
assert (nucl_index[num-1] == num-1);
|
||||||
|
|
||||||
free(nucl_index);
|
free(nucl_index);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user