test_serialize_buffer_length_string Subroutine

public subroutine test_serialize_buffer_length_string()

Arguments

None

Calls

proc~~test_serialize_buffer_length_string~~CallsGraph proc~test_serialize_buffer_length_string test_serialize_buffer_length_string anyexceptions anyexceptions proc~test_serialize_buffer_length_string->anyexceptions assertequal assertequal proc~test_serialize_buffer_length_string->assertequal interface~serialize_buffer_length serialize_buffer_length proc~test_serialize_buffer_length_string->interface~serialize_buffer_length

Source Code

   subroutine test_serialize_buffer_length_string()

      call check('a',3); if (anyExceptions()) return
      call check('ab',3); if (anyExceptions()) return
      call check('abc',3); if (anyExceptions()) return
      call check('abcd',3); if (anyExceptions()) return
      call check('abcde',4); if (anyExceptions()) return

   contains

      subroutine check(str, expected)
         character(len=*), intent(in) :: str
         integer, intent(in) :: expected

         @assertEqual(expected, serialize_buffer_length(str))

      end subroutine check

   end subroutine test_serialize_buffer_length_string