Skip to content

Commit dced3de

Browse files
committed
add overwrite string test
1 parent 7d8e6c6 commit dced3de

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

src/write.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106

107107
call h5tset_size_f(type_id, int(charlen, SIZE_T), ierr)
108108
if(ierr /= 0) error stop "h5fortran:h5tset_size:character: " // dname // " in " // self%filename
109-
print *, "TRACE: Write char: length:", int(charlen, SIZE_T)
109+
110110
dtype_id = type_id
111111
else
112112
type_id = dtype

test/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,14 @@ EXECUTABLE ${CMAKE_CTEST_COMMAND}
1414
)
1515
endif()
1616

17-
# --- test utils
18-
19-
add_library(test_utils OBJECT utils.f90)
20-
2117
# --- unit tests
2218

2319
set(test_names attributes cast deflate_write deflate_props deflate_read destructor exist groups layout shape string)
2420

2521
foreach(t IN LISTS test_names)
2622

2723
add_executable(test_${t} test_${t}.f90)
28-
target_link_libraries(test_${t} PRIVATE h5mpi test_utils HDF5::HDF5 MPI::MPI_Fortran)
24+
target_link_libraries(test_${t} PRIVATE h5mpi HDF5::HDF5 MPI::MPI_Fortran)
2925

3026
add_test(NAME ${t}
3127
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${Nmpi} $<TARGET_FILE:test_${t}>

test/test_string.f90

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ program test_string
2020
call mpi_comm_rank(MPI_COMM_WORLD, mpi_id, ierr)
2121
if (ierr /= 0) error stop "mpi_comm_rank"
2222

23-
if(mpi_id == 0)call test_write(fn)
23+
call test_write(fn)
2424
if(mpi_id == 0) print *, "OK: HDF5 string write"
2525

2626
call test_read(fn)
2727
if(mpi_id == 0) print *,'OK: HDF5 string read'
2828

29-
! call test_overwrite(fn)
30-
! if(mpi_id == 0) print *, "OK: string overwrite"
31-
!! TODO: overwrite needs to not write_scalar with h5lt
29+
call test_overwrite(fn)
30+
if(mpi_id == 0) print *, "OK: string overwrite"
3231

3332
call mpi_finalize(ierr)
3433
if (ierr /= 0) error stop "mpi_finalize"
@@ -44,7 +43,7 @@ subroutine test_write(fn)
4443

4544
type(hdf5_file) :: h
4645

47-
call h%open(fn, action='w', mpi=.false.)
46+
call h%open(fn, action='w', mpi=.true.)
4847

4948
call h%write('/little', '42')
5049
call h%write('/MySentence', 'this is a little sentence.')

test/utils.f90

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)