test_construct_converter Subroutine

public subroutine test_construct_converter()

Arguments

None

Calls

proc~~test_construct_converter~~CallsGraph proc~test_construct_converter test_construct_converter assertequal assertequal proc~test_construct_converter->assertequal assertfalse assertfalse proc~test_construct_converter->assertfalse finalize_udunits_system finalize_udunits_system proc~test_construct_converter->finalize_udunits_system initialize_udunits_system initialize_udunits_system proc~test_construct_converter->initialize_udunits_system none~is_free CptrWrapper%is_free proc~test_construct_converter->none~is_free

Source Code

   subroutine test_construct_converter()
      type(UDUnit) :: unit1
      type(UDUnit) :: unit2
      type(Converter) :: conv
      integer(ut_status) :: status
      
      call initialize_udunits_system(rc=status)
      @assertEqual(UT_SUCCESS, status, 'Failed to initialize')
      unit1 = UDUnit(KM)
      unit2 = UDUnit(M)
      conv = Converter(unit1, unit2) 
      @assertFalse(conv%is_free(), 'cv_converter is not set')
      
      call unit1%free()
      call unit2%free()
      call conv%free()
      call finalize_udunits_system()

   end subroutine test_construct_converter