test_get_field_item Subroutine

public subroutine test_get_field_item()

Arguments

None

Calls

proc~~test_get_field_item~~CallsGraph proc~test_get_field_item test_get_field_item assert_that assert_that proc~test_get_field_item->assert_that assertequal assertequal proc~test_get_field_item->assertequal none~get_item FieldDictionary%get_item proc~test_get_field_item->none~get_item none~get_long_name FieldDictionaryItem%get_long_name proc~test_get_field_item->none~get_long_name none~get_units FieldDictionaryItem%get_units proc~test_get_field_item->none~get_units none~at~153 FieldDictionaryItemMap%at none~get_item->none~at~153 proc~mapl_return MAPL_Return none~get_item->proc~mapl_return proc~mapl_verify MAPL_Verify none~get_item->proc~mapl_verify none~at_rc~9 FieldDictionaryItemMap%at_rc none~at~153->none~at_rc~9 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 proc~mapl_verify->proc~mapl_throw_exception none~find~39 FieldDictionaryItemMap%find none~at_rc~9->none~find~39

Source Code

   subroutine test_get_field_item()
      type(FieldDictionary) :: fd
      type(FieldDictionaryItem) :: item

      integer :: status
      
      fd = FieldDictionary(stream='{X_Y_Z: {canonical_units: m, long_name: "X Y Z"}}')

      item = fd%get_item('X_Y_Z', rc=status)
      @assert_that(status, is(0))
      @assertEqual('m', item%get_units())
      @assertEqual('X Y Z', item%get_long_name())
      
   end subroutine test_get_field_item