Skip to content

Commit

Permalink
Add explicit testing for VMLog() and VMLogSystem().
Browse files Browse the repository at this point in the history
  • Loading branch information
theurich committed Aug 3, 2023
1 parent b53abdc commit fb1f870
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Infrastructure/VM/tests/ESMF_VMUTest.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,20 @@ program ESMF_VMUTest
call ESMF_VMPrint(vm, rc=rc)
call ESMF_Test((rc.eq.ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)

!------------------------------------------------------------------------
!NEX_UTest
write(name, *) "VMLog w/ prefix"
write(failMsg, *) "Did not return ESMF_SUCCESS"
call ESMF_VMLog(vm, prefix="TestVMLog: ", rc=rc)
call ESMF_Test((rc == ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)

!------------------------------------------------------------------------
!NEX_UTest
write(name, *) "VMLogSystem w/ prefix"
write(failMsg, *) "Did not return ESMF_SUCCESS"
call ESMF_VMLogSystem(prefix="TestVMLogSystem: ", rc=rc)
call ESMF_Test((rc == ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)

!------------------------------------------------------------------------
!NEX_UTest
write(failMsg, *) "Did not return ESMF_SUCCESS"
Expand Down Expand Up @@ -1469,10 +1483,10 @@ program ESMF_VMUTest
write(failMsg, *) "Did not return ESMF_SUCCESS"
call ESMF_VMLogMemInfo(prefix="TestPrefix", log=log, rc=rc)
call ESMF_Test((rc == ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)

call ESMF_LogClose(log, rc=rc)
if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)

#endif
call ESMF_TestEnd(ESMF_SRCLINE)

Expand Down

0 comments on commit fb1f870

Please sign in to comment.