test_serialize_logical_array Subroutine

public subroutine test_serialize_logical_array()

Arguments

None

Calls

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

Source Code

   subroutine test_serialize_logical_array()

      call check([.true.]); if (anyExceptions()) return
      call check([.false.]); if (anyExceptions()) return
      call check([.true.,.false.]); if (anyExceptions()) return

   contains

      subroutine check(expected)
         logical, intent(in) :: expected(:)
         logical, allocatable :: found(:)
         integer :: i
         call deserialize_intrinsic(serialize_intrinsic(expected),found)
         do i = 1,size(expected)
            @assertEqual(expected(i), found(i))
         enddo

      end subroutine check
      
   end subroutine test_serialize_logical_array