test_get_coordinate_data Subroutine

public subroutine test_get_coordinate_data()

Arguments

None

Calls

proc~~test_get_coordinate_data~~CallsGraph proc~test_get_coordinate_data test_get_coordinate_data assertequal assertequal proc~test_get_coordinate_data->assertequal none~get_coordinate_data CoordinateVariable%get_coordinate_data proc~test_get_coordinate_data->none~get_coordinate_data proc~mapl_return MAPL_Return none~get_coordinate_data->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

   subroutine test_get_coordinate_data()
      type (Variable) :: var
      type (CoordinateVariable) :: cvar
      class(*), pointer :: c32(:),c64(:)

      var  = Variable(type=pFIO_INT32)
      cvar = CoordinateVariable(var, [1.0_real32, 10.0_real32])
      c32 => cvar%get_coordinate_data()
      select type (c32)
      type is (real(real32))   
         @assertEqual(c32, [1.0_real32, 10.0_real32])
      end select

      var  = Variable(type=pFIO_INT32)
      cvar = CoordinateVariable(var, [1.0_real64, 10.0_real64])
      c64 => cvar%get_coordinate_data()    
      select type (c64)
      type is (real(real64))   
        @assertEqual(c64, [1.0_real64, 10.0_real64])
      end select

   end subroutine test_get_coordinate_data