Add tests.

This commit is contained in:
Drup 2018-03-28 21:53:42 +02:00
parent 82715cc2cc
commit 3bc8dce19d

View file

@ -1321,6 +1321,14 @@ let sample k seq =
if !i < k then Array.sub a 0 (!i + 1)
else a
(*$QR
Q.(pair (list int) (1 -- 20)) (fun (l, n) ->
let seq = of_list l in
let a = sample n seq in
(Array.for_all (fun x -> exists ((=) x) seq) a)
&& (Array.length a = Pervasives.min (length seq) n) )
*)
(** {2 Infix functions} *)
module Infix = struct