diff --git a/test/clojure/test_clojure/transients.clj b/test/clojure/test_clojure/transients.clj new file mode 100644 index 0000000000..8444e2a363 --- /dev/null +++ b/test/clojure/test_clojure/transients.clj @@ -0,0 +1,10 @@ +(ns clojure.test-clojure.transients + (:use clojure.test)) + +(deftest popping-off + (testing "across a node boundary" + (let [v (-> (range 33) vec)] + (is (= (subvec v 0 31) (-> v transient pop! pop! persistent!))))) + (testing "off the end" + (is (thrown-with-msg? IllegalStateException #"Can't pop empty vector" + (-> [] transient pop!)))))