aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2010-02-11 17:07:08 -0500
committerStuart Sierra <mail@stuartsierra.com>2010-02-11 17:07:08 -0500
commitfaa392bb82018203a82d56013aa8b55c89ef2b5f (patch)
tree15a731e9450dcb9a15ca131b114bb7c7231ed773 /src
parent3093440f7191c4a307d600e14bb62b0d0619a54f (diff)
Move tests from test_java.clj to test_string.clj
Diffstat (limited to 'src')
-rw-r--r--src/test/clojure/clojure/contrib/test_string.clj9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/clojure/clojure/contrib/test_string.clj b/src/test/clojure/clojure/contrib/test_string.clj
index 5b734a4a..98f03a78 100644
--- a/src/test/clojure/clojure/contrib/test_string.clj
+++ b/src/test/clojure/clojure/contrib/test_string.clj
@@ -113,3 +113,12 @@
(deftest t-get
(is (= \o (s/get "foo" 1))))
+(deftest t-as-str
+ (testing "keyword to string"
+ (is (= "foo") (s/as-str :foo)))
+ (testing "symbol to string"
+ (is (= "foo") (s/as-str 'foo)))
+ (testing "string to string"
+ (is (= "foo") (s/as-str "foo")))
+ (testing "stringifying non-namish things"
+ (is (= "42") (s/as-str 42))))