remove ounit

This commit is contained in:
Simon Cruanes 2022-07-02 23:18:16 -04:00
parent 55b59b5b91
commit 919360f96e
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
4 changed files with 9 additions and 11 deletions

View file

@ -15,7 +15,6 @@ depends: [
"containers" { = version } "containers" { = version }
"seq" "seq"
"qcheck-core" { with-test } "qcheck-core" { with-test }
"ounit" { with-test }
"iter" { with-test } "iter" { with-test }
"gen" { with-test } "gen" { with-test }
#"mdx" { with-test & >= "1.5.0" & < "2.0.0" } #"mdx" { with-test & >= "1.5.0" & < "2.0.0" }

View file

@ -17,7 +17,6 @@ depends: [
"containers" { = version } "containers" { = version }
"iter" { with-test } "iter" { with-test }
"qcheck-core" { with-test } "qcheck-core" { with-test }
"ounit" { with-test }
"uutf" { with-test } "uutf" { with-test }
"odoc" { with-doc } "odoc" { with-doc }
] ]

View file

@ -143,9 +143,9 @@ let clear_and_reset v =
push v ("hello"^"world"); push v ("hello"^"world");
Weak.set a 0 (Some (get v 0)); Weak.set a 0 (Some (get v 0));
Gc.full_major(); Gc.compact(); Gc.full_major(); Gc.compact();
OUnit2.assert_bool "is alive" (Weak.check a 0); assert_bool "is alive" (Weak.check a 0);
Gc.full_major(); Gc.compact(); Gc.full_major(); Gc.compact();
OUnit2.assert_equal None (Weak.get a 0); assert_equal None (Weak.get a 0);
*) *)
let[@inline] is_empty v = v.size = 0 let[@inline] is_empty v = v.size = 0

View file

@ -11,23 +11,23 @@
let tbl = CCMixtbl.create 10 ;; let tbl = CCMixtbl.create 10 ;;
OUnit2.assert_equal None (CCMixtbl.get ~inj:inj_int tbl "a");; assert_equal None (CCMixtbl.get ~inj:inj_int tbl "a");;
CCMixtbl.set inj_int tbl "a" 1;; CCMixtbl.set inj_int tbl "a" 1;;
OUnit2.assert_equal (Some 1) (CCMixtbl.get ~inj:inj_int tbl "a");; assert_equal (Some 1) (CCMixtbl.get ~inj:inj_int tbl "a");;
let inj_string = CCMixtbl.create_inj () ;; let inj_string = CCMixtbl.create_inj () ;;
CCMixtbl.set inj_string tbl "b" "Hello"; CCMixtbl.set inj_string tbl "b" "Hello";
OUnit2.assert_equal (Some "Hello") (CCMixtbl.get inj_string tbl "b");; assert_equal (Some "Hello") (CCMixtbl.get inj_string tbl "b");;
OUnit2.assert_equal None (CCMixtbl.get inj_string tbl "a");; assert_equal None (CCMixtbl.get inj_string tbl "a");;
OUnit2.assert_equal (Some 1) (CCMixtbl.get inj_int tbl "a");; assert_equal (Some 1) (CCMixtbl.get inj_int tbl "a");;
CCMixtbl.set inj_string tbl "a" "Bye";; CCMixtbl.set inj_string tbl "a" "Bye";;
OUnit2.assert_equal None (CCMixtbl.get inj_int tbl "a");; assert_equal None (CCMixtbl.get inj_int tbl "a");;
OUnit2.assert_equal (Some "Bye") (CCMixtbl.get inj_string tbl "a");; assert_equal (Some "Bye") (CCMixtbl.get inj_string tbl "a");;
]} ]}
@since 0.6 *) @since 0.6 *)