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 UnlimitedEntity%get_values proc~test_get_attribute_real_double->none~get_values 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~85 StringAttributeMap%at none~get_attribute->none~at~85 proc~mapl_return MAPL_Return none~get_attribute->proc~mapl_return none~get_shape->proc~mapl_return none~get_values->proc~mapl_return none~add_attribute_1d->proc~mapl_return none~insert~76 StringAttributeMap%insert none~add_attribute_1d->none~insert~76 none~find~17 StringAttributeMap%find none~at~85->none~find~17 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~5 StringAttributeMap%insert_pair none~insert~76->none~insert_pair~5

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