test_var_dims_defined Subroutine

public subroutine test_var_dims_defined()

Arguments

None

Calls

proc~~test_var_dims_defined~~CallsGraph proc~test_var_dims_defined test_var_dims_defined assertequal assertequal proc~test_var_dims_defined->assertequal none~add_dimension FileMetadata%add_dimension proc~test_var_dims_defined->none~add_dimension none~add_variable~2 FileMetadata%add_variable proc~test_var_dims_defined->none~add_variable~2 insert insert none~add_dimension->insert interface~mapl_assert MAPL_Assert none~add_dimension->interface~mapl_assert none~get_dimension FileMetadata%get_dimension none~add_dimension->none~get_dimension none~has_dimension FileMetadata%has_dimension none~add_dimension->none~has_dimension proc~mapl_return MAPL_Return none~add_dimension->proc~mapl_return at at none~add_variable~2->at begin begin none~add_variable~2->begin none~add_variable~2->interface~mapl_assert next next none~add_variable~2->next none~get_const_value Variable%get_const_value none~add_variable~2->none~get_const_value none~get_dimensions~3 Variable%get_dimensions none~add_variable~2->none~get_dimensions~3 none~get_shape UnlimitedEntity%get_shape none~add_variable~2->none~get_shape none~insert~405 StringVariableMap%insert none~add_variable~2->none~insert~405 none~is_empty UnlimitedEntity%is_empty none~add_variable~2->none~is_empty of of none~add_variable~2->of none~add_variable~2->proc~mapl_return push_back push_back none~add_variable~2->push_back none~get_dimension->at none~get_dimension->proc~mapl_return find find none~get_dimension->find none~get_shape->proc~mapl_return none~has_dimension->proc~mapl_return none~has_dimension->find none~insert_pair~35 StringVariableMap%insert_pair none~insert~405->none~insert_pair~35 none~is_empty->proc~mapl_return none~get_value~9 UnlimitedEntity%get_value none~is_empty->none~get_value~9 proc~mapl_return->at proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception none~get_value~9->proc~mapl_return

Source Code

   subroutine test_var_dims_defined()
      type (FileMetadata) :: cf
      type (Variable) :: v
      integer :: status

      cf = FileMetaData()
      call cf%add_dimension('x', 10)
      call cf%add_dimension('y', 20)

      v = Variable(type=pFIO_REAL64, dimensions='x,y')
      call cf%add_variable('mass', v, rc=status)
      !@assertExceptionRaised("FileMetadata::add_variable() - undefined dimension 'z'.")
      @assertEqual(0, status)
      
   end subroutine test_var_dims_defined