test_get_attributes Subroutine

public subroutine test_get_attributes()

Arguments

None

Calls

proc~~test_get_attributes~~CallsGraph proc~test_get_attributes test_get_attributes assertequal assertequal proc~test_get_attributes->assertequal none~add_attribute~3 FileMetadata%add_attribute proc~test_get_attributes->none~add_attribute~3 none~get_attributes~2 FileMetadata%get_attributes proc~test_get_attributes->none~get_attributes~2 none~add_attribute_0d~2 FileMetadata%add_attribute_0d none~add_attribute~3->none~add_attribute_0d~2 none~add_attribute_1d~2 FileMetadata%add_attribute_1d none~add_attribute~3->none~add_attribute_1d~2 none~get_attributes Variable%get_attributes none~get_attributes~2->none~get_attributes proc~mapl_return MAPL_Return none~get_attributes~2->proc~mapl_return none~add_attribute_0d~2->proc~mapl_return none~add_attribute~2 Variable%add_attribute none~add_attribute_0d~2->none~add_attribute~2 none~add_attribute_1d~2->proc~mapl_return none~add_attribute_1d~2->none~add_attribute~2 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 none~add_attribute_1d Variable%add_attribute_1d none~add_attribute~2->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