From 952b664a68d773a1d466f4db8cd1d97be0770a96 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 18 Apr 2020 22:14:35 -0400 Subject: [PATCH] test for funvec --- src/data/CCFun_vec.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/data/CCFun_vec.ml b/src/data/CCFun_vec.ml index 52ef8aca..93d6822c 100644 --- a/src/data/CCFun_vec.ml +++ b/src/data/CCFun_vec.ml @@ -250,6 +250,18 @@ let pop (v:'a t) : ('a * 'a t) option = () *) +(*$QR + Q.(pair int (small_list int)) (fun (x,l) -> + let q0 = of_list l in + let q = push x q0 in + assert_equal (length q) (length q0+1); + let y, q = pop_exn q in + assert_equal x y; + assert_equal (to_list q) (to_list q0); + true + ) + *) + let iteri ~f (m : 'a t) : unit = (* basically, a 32-way BFS traversal. The queue contains subtrees to explore, along with their high_idx_ offsets *)