1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 20:35:44 +01:00

add tests for trexio_info

This commit is contained in:
q-posev 2022-01-20 14:22:32 +01:00
parent 23c1601442
commit 5e82e0fc57
3 changed files with 12 additions and 7 deletions

View File

@ -38,6 +38,8 @@ except:
#============ WRITE THE DATA IN THE TEST FILE ============# #============ WRITE THE DATA IN THE TEST FILE ============#
#=========================================================# #=========================================================#
trexio.info()
# create TREXIO file and open it for writing # create TREXIO file and open it for writing
test_file = trexio.File(output_filename, mode='w', back_end=TEST_TREXIO_BACKEND) test_file = trexio.File(output_filename, mode='w', back_end=TEST_TREXIO_BACKEND)
assert test_file.exists assert test_file.exists

View File

@ -14,6 +14,8 @@ int main() {
int rc; int rc;
trexio_info();
bool have_hdf5 = trexio_has_backend(TREXIO_HDF5); bool have_hdf5 = trexio_has_backend(TREXIO_HDF5);
if(have_hdf5) { if(have_hdf5) {
rc = system("rm -f -- test_all.h5"); rc = system("rm -f -- test_all.h5");
@ -223,5 +225,3 @@ int test_read(const char* file_name, const back_end_t backend) {
return 0; return 0;
} }

View File

@ -3,6 +3,7 @@ program test_trexio
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
implicit none implicit none
integer :: rc
logical :: have_hdf5 logical :: have_hdf5
print * , "============================================" print * , "============================================"
@ -11,6 +12,8 @@ program test_trexio
print'(a,i3)', " TREXIO MINOR VERSION : ", TREXIO_VERSION_MINOR print'(a,i3)', " TREXIO MINOR VERSION : ", TREXIO_VERSION_MINOR
print * , "============================================" print * , "============================================"
rc = trexio_info()
call system('rm -rf -- test_write_f.dir') call system('rm -rf -- test_write_f.dir')
print *, 'call test_write(''test_write_f.dir'', TREXIO_TEXT)' print *, 'call test_write(''test_write_f.dir'', TREXIO_TEXT)'
call test_write('test_write_f.dir', TREXIO_TEXT) call test_write('test_write_f.dir', TREXIO_TEXT)