summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/clojure/test_clojure/pprint/test_pretty.clj9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/clojure/test_clojure/pprint/test_pretty.clj b/test/clojure/test_clojure/pprint/test_pretty.clj
index 74513fe1..ee328fbc 100644
--- a/test/clojure/test_clojure/pprint/test_pretty.clj
+++ b/test/clojure/test_clojure/pprint/test_pretty.clj
@@ -209,6 +209,13 @@ Usage: *hello*
(deliver promise-filled '(first second third))
(def promise-unfilled (promise))
(def basic-agent (agent '(first second third)))
+(defn failed-agent
+ "must be a fn because you cannot await agents during load"
+ []
+ (let [a (agent "foo")]
+ (send a +)
+ (try (await-for 100 failed-agent) (catch RuntimeException re))
+ a))
(def basic-atom (atom '(first second third)))
(def basic-ref (ref '(first second third)))
(def delay-forced (delay '(first second third)))
@@ -216,7 +223,6 @@ Usage: *hello*
(def delay-unforced (delay '(first second third)))
(defrecord pprint-test-rec [a b c])
-
(simple-tests pprint-datastructures-tests
(tst-pprint 20 future-filled) #"#<Future@[0-9a-f]+: \n 100>"
(tst-pprint 20 future-unfilled) #"#<Future@[0-9a-f]+: \n :pending>"
@@ -224,6 +230,7 @@ Usage: *hello*
;; This hangs currently, cause we can't figure out whether a promise is filled
;;(tst-pprint 20 promise-unfilled) #"#<Promise@[0-9a-f]+: \n :pending>"
(tst-pprint 20 basic-agent) #"#<Agent@[0-9a-f]+: \n \(first\n second\n third\)>"
+ (tst-pprint 20 (failed-agent)) #"#<Agent@[0-9a-f]+ FAILED: \n \"foo\">"
(tst-pprint 20 basic-atom) #"#<Atom@[0-9a-f]+: \n \(first\n second\n third\)>"
(tst-pprint 20 basic-ref) #"#<Ref@[0-9a-f]+: \n \(first\n second\n third\)>"
(tst-pprint 20 delay-forced) #"#<Delay@[0-9a-f]+: \n \(first\n second\n third\)>"