test_get_attributes Subroutine

public subroutine test_get_attributes()

Arguments

None

Calls

proc~~test_get_attributes~~CallsGraph proc~test_get_attributes Test_FileMetadata::test_get_attributes assertequal assertequal proc~test_get_attributes->assertequal none~add_attribute~2 pFIO_FileMetadataMod::FileMetadata%add_attribute proc~test_get_attributes->none~add_attribute~2 none~get_attributes pFIO_FileMetadataMod::FileMetadata%get_attributes proc~test_get_attributes->none~get_attributes none~add_attribute_0d pFIO_FileMetadataMod::FileMetadata%add_attribute_0d none~add_attribute~2->none~add_attribute_0d none~add_attribute_1d~2 pFIO_FileMetadataMod::FileMetadata%add_attribute_1d none~add_attribute~2->none~add_attribute_1d~2 none~get_attributes~2 pFIO_VariableMod::Variable%get_attributes none~get_attributes->none~get_attributes~2 proc~mapl_return MAPL_ErrorHandlingMod::MAPL_Return none~get_attributes->proc~mapl_return none~add_attribute_0d->proc~mapl_return none~add_attribute pFIO_VariableMod::Variable%add_attribute none~add_attribute_0d->none~add_attribute none~add_attribute_1d~2->proc~mapl_return none~add_attribute_1d~2->none~add_attribute at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception none~add_attribute_1d pFIO_VariableMod::Variable%add_attribute_1d none~add_attribute->none~add_attribute_1d

Source Code

   subroutine test_get_attributes()
      type (FileMetadata), target :: cf
      type (StringAttributeMap), pointer :: attributes

      call cf%add_attribute('x', 10)
      call cf%add_attribute('y', 11)

      attributes => cf%get_attributes()
      @assertEqual(2, attributes%size())

   end subroutine test_get_attributes