test_get_attribute_real_double Subroutine

public subroutine test_get_attribute_real_double()

Arguments

None

Calls

proc~~test_get_attribute_real_double~~CallsGraph proc~test_get_attribute_real_double test_get_attribute_real_double assertequal assertequal proc~test_get_attribute_real_double->assertequal asserttrue asserttrue proc~test_get_attribute_real_double->asserttrue none~add_attribute~2 Variable%add_attribute proc~test_get_attribute_real_double->none~add_attribute~2 none~get_attribute Variable%get_attribute proc~test_get_attribute_real_double->none~get_attribute none~get_shape UnlimitedEntity%get_shape proc~test_get_attribute_real_double->none~get_shape none~get_values~2 UnlimitedEntity%get_values proc~test_get_attribute_real_double->none~get_values~2 none~add_attribute_1d Variable%add_attribute_1d none~add_attribute~2->none~add_attribute_1d interface~mapl_assert MAPL_Assert none~get_attribute->interface~mapl_assert none~at~226 StringAttributeMap%at none~get_attribute->none~at~226 proc~mapl_return MAPL_Return none~get_attribute->proc~mapl_return none~get_shape->proc~mapl_return none~get_values~2->proc~mapl_return none~add_attribute_1d->proc~mapl_return none~insert~170 StringAttributeMap%insert none~add_attribute_1d->none~insert~170 none~find~59 StringAttributeMap%find none~at~226->none~find~59 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~insert_pair~18 StringAttributeMap%insert_pair none~insert~170->none~insert_pair~18

Source Code

   subroutine test_get_attribute_real_double()
      type (Variable) :: var
      type (Attribute), pointer :: attr
      class (*), pointer :: values(:)

      var = Variable(type=pFIO_INT32, dimensions='x')
      call var%add_attribute('pet_size', [15._REAL64,24._REAL64])

      attr => var%get_attribute('pet_size')
      @assertEqual([2], attr%get_shape())

      values => attr%get_values()
      select type (values)
      type is (real(REAL64))
         @assertEqual([15,24], values)
      class default
         @assertTrue(1==2)
      end select

   end subroutine test_get_attribute_real_double