summary refs log tree commit diff stats
path: root/clojure/raindrops/test/raindrops_test.clj
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-09-05 22:23:54 +0530
committerAndinus <andinus@nand.sh>2021-09-05 22:23:54 +0530
commitfec4b82917ccb41362c3170e1b71f9dbf98fb997 (patch)
tree5a9a44dc62fd4e4566a6f963c734d8724de64611 /clojure/raindrops/test/raindrops_test.clj
parent670546b8a284bee51f63f00dabcf89b9ea463e68 (diff)
downloadexercism-fec4b82917ccb41362c3170e1b71f9dbf98fb997.tar.gz
Clojure: Raindrops: Add solution
Diffstat (limited to 'clojure/raindrops/test/raindrops_test.clj')
-rw-r--r--clojure/raindrops/test/raindrops_test.clj51
1 files changed, 51 insertions, 0 deletions
diff --git a/clojure/raindrops/test/raindrops_test.clj b/clojure/raindrops/test/raindrops_test.clj
new file mode 100644
index 0000000..912c887
--- /dev/null
+++ b/clojure/raindrops/test/raindrops_test.clj
@@ -0,0 +1,51 @@
+(ns raindrops-test
+  (:require [clojure.test :refer [deftest is]]
+            raindrops))
+
+(deftest one
+  (is (= "1" (raindrops/convert 1))))
+
+(deftest three
+  (is (= "Pling" (raindrops/convert 3))))
+
+(deftest five
+  (is (= "Plang" (raindrops/convert 5))))
+
+(deftest seven
+  (is (= "Plong" (raindrops/convert 7))))
+
+(deftest six
+  (is (= "Pling" (raindrops/convert 6))))
+
+(deftest nine
+  (is (= "Pling" (raindrops/convert 9))))
+
+(deftest ten
+  (is (= "Plang" (raindrops/convert 10))))
+
+(deftest fourteen
+  (is (= "Plong" (raindrops/convert 14))))
+
+(deftest fifteen
+  (is (= "PlingPlang" (raindrops/convert 15))))
+
+(deftest twenty-one
+  (is (= "PlingPlong" (raindrops/convert 21))))
+
+(deftest twenty-five
+  (is (= "Plang" (raindrops/convert 25))))
+
+(deftest thirty-five
+  (is (= "PlangPlong" (raindrops/convert 35))))
+
+(deftest forty-nine
+  (is (= "Plong" (raindrops/convert 49))))
+
+(deftest fifty-two
+  (is (= "52" (raindrops/convert 52))))
+
+(deftest one-hundred-five
+  (is (= "PlingPlangPlong" (raindrops/convert 105))))
+
+(deftest twelve-thousand-one-hundred-twenty-one
+  (is (= "12121" (raindrops/convert 12121))))