From faa392bb82018203a82d56013aa8b55c89ef2b5f Mon Sep 17 00:00:00 2001 From: Stuart Sierra Date: Thu, 11 Feb 2010 17:07:08 -0500 Subject: Move tests from test_java.clj to test_string.clj --- src/test/clojure/clojure/contrib/test_string.clj | 9 +++++++++ 1 file changed, 9 insertions(+) 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)))) -- cgit v1.2.3-18-g5258