summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-04-28 22:35:12 +0600
committerDaniil Baturin <daniil@baturin.org>2015-04-28 22:35:12 +0600
commite2156cbf273d774a43fd3515cab87ac9c4c64c4f (patch)
tree00ccfce38fb11bb7b3eea6cbf27b5db0b8959e40 /test
parent9fdd54c2c129fe97b3d96128ca17a787eeeefb3f (diff)
downloadvyconf-e2156cbf273d774a43fd3515cab87ac9c4c64c4f.tar.gz
vyconf-e2156cbf273d774a43fd3515cab87ac9c4c64c4f.zip
Add Vylist.in_list for quick checks.
Diffstat (limited to 'test')
-rw-r--r--test/vylist_test.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/vylist_test.ml b/test/vylist_test.ml
index 45336bb..8cd504b 100644
--- a/test/vylist_test.ml
+++ b/test/vylist_test.ml
@@ -55,6 +55,12 @@ let test_complement_doesnt_contain test_ctxt =
let xs = [1;2;3] and ys = [1;4;5;6] in
assert_equal (complement xs ys) None
+(* in_list works *)
+let test_in_list test_ctxt =
+ let xs = [1;2;3;4] in
+ assert_equal (in_list xs 3) true;
+ assert_equal (in_list xs 9) false
+
let suite =
"VyConf list tests" >::: [
"test_find_existent" >:: test_find_existent;