diff options
author | Andinus <andinus@nand.sh> | 2021-09-05 22:23:54 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-09-05 22:23:54 +0530 |
commit | fec4b82917ccb41362c3170e1b71f9dbf98fb997 (patch) | |
tree | 5a9a44dc62fd4e4566a6f963c734d8724de64611 /clojure/raindrops/test/raindrops_test.clj | |
parent | 670546b8a284bee51f63f00dabcf89b9ea463e68 (diff) | |
download | exercism-fec4b82917ccb41362c3170e1b71f9dbf98fb997.tar.gz |
Clojure: Raindrops: Add solution
Diffstat (limited to 'clojure/raindrops/test/raindrops_test.clj')
-rw-r--r-- | clojure/raindrops/test/raindrops_test.clj | 51 |
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)))) |