Permalink
Browse files

Added testing_a_function

  • Loading branch information...
1 parent 5645331 commit 729aa56098703de79d8e46dfd3a0c70a7a196465 @purcell committed Dec 30, 2009
Showing with 14 additions and 0 deletions.
  1. +14 −0 testing_a_function.clj
View
@@ -0,0 +1,14 @@
+;; http://rosettacode.org/wiki/Testing_a_Function#Clojure
+
+
+(defn palindrome? [s]
+ (= s (apply str (reverse s))))
+
+
+(use 'clojure.test)
+
+(deftest test-palindrome?
+ (is (= true (palindrome? "amanaplanacanalpanama")))
+ (is (= false (palindrome? "Test 1, 2, 3"))))
+
+(run-tests)

0 comments on commit 729aa56

Please sign in to comment.