rlm@10: (ns clojure.test-clojure.transients rlm@10: (:use clojure.test)) rlm@10: rlm@10: (deftest popping-off rlm@10: (testing "across a node boundary" rlm@10: (are [n] rlm@10: (let [v (-> (range n) vec)] rlm@10: (= (subvec v 0 (- n 2)) (-> v transient pop! pop! persistent!))) rlm@10: 33 (+ 32 (inc (* 32 32))) (+ 32 (inc (* 32 32 32))))) rlm@10: (testing "off the end" rlm@10: (is (thrown-with-msg? IllegalStateException #"Can't pop empty vector" rlm@10: (-> [] transient pop!)))))