summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Halloway <stu@thinkrelevance.com>2010-05-26 14:54:50 -0400
committerSTUART HALLOWAY <stuart@STUART-HALLOWAYs-MacBook-Pro.local>2010-05-27 11:39:18 -0400
commit7304976a596bea72a41e81e1e4c6c4484b9734a7 (patch)
tree1340fd3ea3544505a797a6abd1d0b31fcc719dff
parent7700d66d5a657d2102ddeb560d52bca758669ed9 (diff)
test for #358
Signed-off-by: STUART HALLOWAY <stuart@STUART-HALLOWAYs-MacBook-Pro.local>
-rw-r--r--test/clojure/test_clojure/transients.clj10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/clojure/test_clojure/transients.clj b/test/clojure/test_clojure/transients.clj
new file mode 100644
index 00000000..8444e2a3
--- /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!)))))