Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move tests from test_java.clj to test_string.clj

  • Loading branch information...
commit faa392bb82018203a82d56013aa8b55c89ef2b5f 1 parent 3093440
@stuartsierra stuartsierra authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/test/clojure/clojure/contrib/test_string.clj
View
9 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))))
Please sign in to comment.
Something went wrong with that request. Please try again.