summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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!)))))