forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathounit_int_vec_tests.ml
33 lines (30 loc) · 950 Bytes
/
ounit_int_vec_tests.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
let ((>::),
(>:::)) = OUnit.((>::),(>:::))
let (=~) = OUnit.assert_equal
let suites =
__FILE__
>:::
[
__LOC__ >:: begin fun _ ->
OUnit.assert_bool __LOC__
(Int_vec_util.mem 3 (Vec_int.of_list [1;2;3]))
;
OUnit.assert_bool __LOC__
(not @@ Int_vec_util.mem 0 (Vec_int.of_list [1;2]) );
let v = Vec_int.make 100 in
OUnit.assert_bool __LOC__
(not @@ Int_vec_util.mem 0 v) ;
Vec_int.push v 0;
OUnit.assert_bool __LOC__
(Int_vec_util.mem 0 v )
end;
__LOC__ >:: begin fun _ ->
let u = Vec_int.make 100 in
Vec_int.push u 1;
OUnit.assert_bool __LOC__
(not @@ Int_vec_util.mem 0 u );
Vec_int.push u 0;
OUnit.assert_bool __LOC__
(Int_vec_util.mem 0 u)
end
]