test_is_empty Subroutine

public subroutine test_is_empty()

Arguments

None

Calls

proc~~test_is_empty~~CallsGraph proc~test_is_empty test_is_empty assertfalse assertfalse proc~test_is_empty->assertfalse asserttrue asserttrue proc~test_is_empty->asserttrue none~is_empty UnlimitedEntity%is_empty proc~test_is_empty->none~is_empty none~get_value UnlimitedEntity%get_value none~is_empty->none~get_value proc~mapl_return MAPL_Return none~is_empty->proc~mapl_return none~get_value->proc~mapl_return 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

Source Code

   subroutine test_is_empty()
      type (UnlimitedEntity) :: a
      logical :: is
      
      ! not initialized
      is = a%is_empty()
      @assertTrue(is)
     
      ! empty string
      a = UnlimitedEntity('')
      is = a%is_empty()
      @assertTrue(is)

      a = UnlimitedEntity('no')
      is = a%is_empty()
      @assertFalse(is)

      a = UnlimitedEntity(0)
      is = a%is_empty()
      @assertFalse(is)

      a = UnlimitedEntity([0])
      is = a%is_empty()
      @assertFalse(is)

   end subroutine test_is_empty