test_equal_values Subroutine

public subroutine test_equal_values()

Arguments

None

Calls

proc~~test_equal_values~2~~CallsGraph proc~test_equal_values~2 test_equal_values assertfalse assertfalse proc~test_equal_values~2->assertfalse asserttrue asserttrue proc~test_equal_values~2->asserttrue

Source Code

   subroutine test_equal_values()
      type (Attribute) :: a
      type (Attribute) :: b
      character(len=:),allocatable :: c1,c2

      a = Attribute(1.)
      b = Attribute(2.)

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

      a = Attribute([.true., .false.])
      b = Attribute([.true., .true.])

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

      c1 = 'a'
      c2 = 'a'
      a = Attribute(c1)
      b = Attribute(c2)

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

      c1 = 'abcd'
      c2 = 'abcde'
      a = Attribute(c1)
      b = Attribute(c2)

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

   end subroutine test_equal_values