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~2 FieldDictionaryItem%get_long_name proc~test_get_field_item->none~get_long_name~2 none~get_units~4 FieldDictionaryItem%get_units proc~test_get_field_item->none~get_units~4 none~at~430 FieldDictionaryItemMap%at none~get_item->none~at~430 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~18 FieldDictionaryItemMap%at_rc none~at~430->none~at_rc~18 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~116 FieldDictionaryItemMap%find none~at_rc~18->none~find~116

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