1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-11-03 20:54:07 +01:00

adapt tests to use max_str_len parameter

This commit is contained in:
q-posev 2021-06-03 16:13:57 +02:00
parent 40e9aa9234
commit c160de1a1b
2 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ int test_h5write() {
rc = trexio_write_nucleus_charge(file,charge);
assert (rc == TREXIO_SUCCESS);
//rc = trexio_write_nucleus_label(file,label);
rc = trexio_write_nucleus_label(file,labelxxx);
rc = trexio_write_nucleus_label(file,labelxxx, 4);
assert (rc == TREXIO_SUCCESS);
// check if the written data exists in the file
@ -173,7 +173,7 @@ int test_h5read() {
labelxxx = (char*) malloc(num*4*sizeof(char*));
rc = trexio_read_nucleus_label(file,labelxxx);
rc = trexio_read_nucleus_label(file,labelxxx, 4);
//rc = trexio_read_nucleus_label(file,label);
assert (rc == TREXIO_SUCCESS);

View File

@ -70,7 +70,7 @@ subroutine test_write()
rc = trexio_write_nucleus_coord(trex_file, coord)
if (rc == TREXIO_SUCCESS) write(*,*) 'SUCCESS WRITE COORD'
rc = trexio_write_nucleus_label(trex_file, label_str)
rc = trexio_write_nucleus_label(trex_file, label_str, 4)
if (rc == TREXIO_SUCCESS) write(*,*) 'SUCCESS WRITE LABEL'
deallocate(label_str)
@ -143,7 +143,7 @@ subroutine test_read()
if (rc == TREXIO_SUCCESS .and. (abs(coord(2,1) - 1.39250319d0) < 1.0D-8) ) write(*,*) 'SUCCESS READ COORD'
rc = trexio_read_nucleus_label(trex_file, label_str)
rc = trexio_read_nucleus_label(trex_file, label_str, 4)
! --------------------------------------------------
! dummy parser of big string with space delimeters