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 ============#
#=========================================================#
trexio.info()
# create TREXIO file and open it for writing
test_file = trexio.File(output_filename, mode='w', back_end=TEST_TREXIO_BACKEND)
assert test_file.exists

View File

@ -14,6 +14,8 @@ int main() {
int rc;
trexio_info();
bool have_hdf5 = trexio_has_backend(TREXIO_HDF5);
if(have_hdf5) {
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;
}

View File

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