start using qtest

This commit is contained in:
Simon Cruanes 2014-05-12 15:24:15 +02:00
parent 0fc209d4b3
commit fcde09ca24
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ TAGS
*.docdir
setup.log
setup.data
qtest

View file

@ -58,7 +58,7 @@ let snoc l x = make l.front l.f_len (x::l.rear) (l.r_len+1)
let next l = match l.front with
| [] -> assert false
| x::l' ->
x, make l' (l.f_len-1) l.rear l.r_len
x, make l' (l.f_len-1) (x::l.rear) (l.r_len+1)
let rev l = make l.rear l.r_len l.front l.f_len
@ -80,6 +80,11 @@ let exists p l = match find p l with
| None -> false
| Some _ -> true
(*$T
exists (fun x-> x mod 2 = 0) (of_list [1;3;5;7;8])
not (exists (fun x-> x mod 2 = 0) (of_list [1;3;5;7;9]))
*)
let for_all p l =
let rec _check i l =
i = 0 ||