test_are_not_convertible Subroutine

public subroutine test_are_not_convertible()

Arguments

None

Calls

proc~~test_are_not_convertible~~CallsGraph proc~test_are_not_convertible test_are_not_convertible assertequal assertequal proc~test_are_not_convertible->assertequal assertfalse assertfalse proc~test_are_not_convertible->assertfalse asserttrue asserttrue proc~test_are_not_convertible->asserttrue finalize_udunits_system finalize_udunits_system proc~test_are_not_convertible->finalize_udunits_system initialize_udunits_system initialize_udunits_system proc~test_are_not_convertible->initialize_udunits_system interface~are_convertible are_convertible proc~test_are_not_convertible->interface~are_convertible

Source Code

   subroutine test_are_not_convertible()
      type(UDUnit) :: unit1
      type(UDUnit) :: unit2
      integer(ut_status) :: status
      logical :: convertible

      call initialize_udunits_system(rc=status)
      @assertEqual(UT_SUCCESS, status, 'Failed to initialize')
      unit1 = UDUnit(KM)
      unit2 = UDUnit(S)
      convertible = are_convertible(unit1, unit2, rc=status)
      @assertFalse(convertible, 'Units are not convertible.')
      if(.not. convertible) then
         @assertFalse(status == UT_BAD_ARG, 'One of the units is null.')
         @assertFalse(status == UT_NOT_SAME_SYSTEM, 'Units belong to different systems.')
         @assertTrue(status == UT_SUCCESS, 'Units are not convertible.')
      end if

      call unit1%free()
      call unit2%free()
      call finalize_udunits_system()

   end subroutine test_are_not_convertible