Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 15 lines (8 sloc) 0.278 kb
729aa56 @purcell Added testing_a_function
authored
1 ;; http://rosettacode.org/wiki/Testing_a_Function#Clojure
2
3
4 (defn palindrome? [s]
5 (= s (apply str (reverse s))))
6
7
8 (use 'clojure.test)
9
10 (deftest test-palindrome?
11 (is (= true (palindrome? "amanaplanacanalpanama")))
12 (is (= false (palindrome? "Test 1, 2, 3"))))
13
14 (run-tests)
Something went wrong with that request. Please try again.