test_serialize_int_array Subroutine

public subroutine test_serialize_int_array()

Arguments

None

Calls

proc~~test_serialize_int_array~~CallsGraph proc~test_serialize_int_array test_serialize_int_array anyexceptions anyexceptions proc~test_serialize_int_array->anyexceptions assertequal assertequal proc~test_serialize_int_array->assertequal interface~deserialize_intrinsic deserialize_intrinsic proc~test_serialize_int_array->interface~deserialize_intrinsic interface~serialize_intrinsic serialize_intrinsic proc~test_serialize_int_array->interface~serialize_intrinsic

Source Code

   subroutine test_serialize_int_array()

      call check([1]); if (anyExceptions()) return
      call check([2]); if (anyExceptions()) return
      call check([1,2]); if (anyExceptions()) return
      call check([1,2,3]); if (anyExceptions()) return

   contains

      subroutine check(expected)
         integer, intent(in) :: expected(:)
         integer, allocatable :: found(:)

         call deserialize_intrinsic(serialize_intrinsic(expected),found)
         @assertEqual(expected, found)

      end subroutine check
      
   end subroutine test_serialize_int_array