test_equal_shape Subroutine

public subroutine test_equal_shape()

Arguments

None

Calls

proc~~test_equal_shape~~CallsGraph proc~test_equal_shape test_equal_shape assertfalse assertfalse proc~test_equal_shape->assertfalse asserttrue asserttrue proc~test_equal_shape->asserttrue

Source Code

   subroutine test_equal_shape()
      type (UnlimitedEntity) :: a
      type (UnlimitedEntity) :: b
      integer, dimension(2*3*4*5) :: array
      integer, dimension(2*3,4*5) :: a2d
      integer, dimension(2,3,4*5) :: a3d
      integer, dimension(2,3,4,5) :: a4d

      array = 5

      a = UnlimitedEntity(1)
      b = UnlimitedEntity([1,2])

      @assertTrue(a == a)
      @assertFalse(a /= a)
      @assertFalse(a == b)
      @assertTrue(a /= b)

      a2d = reshape(array,[2*3,4*5])
      a = UnlimitedEntity(a2d)
      b = UnlimitedEntity(a2d)
      @assertTrue(a == b)

      a3d = reshape(array, [2,3,4*5])
      a = UnlimitedEntity(a3d)
      b = UnlimitedEntity(a3d)
      @assertTrue(a == b)

      a4d = reshape(array, [2,3,4,5])
      a = UnlimitedEntity(a4d)
      b = UnlimitedEntity(a4d)
      @assertTrue(a == b)

   end subroutine test_equal_shape