From da554d824771398736a526a758815ea23f4f47e3 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Mon, 29 Jun 2015 23:42:26 -0400 Subject: [PATCH] add test for select-one! returning nil result --- test/clj/com/rpl/specter/core_test.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/clj/com/rpl/specter/core_test.clj b/test/clj/com/rpl/specter/core_test.clj index 98d024d..e50920b 100644 --- a/test/clj/com/rpl/specter/core_test.clj +++ b/test/clj/com/rpl/specter/core_test.clj @@ -378,3 +378,8 @@ v (gen/vector (gen/elements [k1 k2 k3]))] (= (filter #{k1 k2} v) (select [ALL #{k1 k2}] v)) )) + +(deftest nil-select-one-test + (is (= nil (select-one! ALL [nil]))) + (is (thrown? Exception (select-one! ALL []))) + ) \ No newline at end of file