-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad4007a
commit f1559de
Showing
30 changed files
with
97 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns acronym-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
acronym)) | ||
|
||
{{#test_cases.abbreviate}} | ||
(deftest acronym_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (acronym/acronym {{input.phrase}}))))) | ||
{{/test_cases.abbreviate~}} | ||
{{/test_cases.abbreviate}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
(ns anagram-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
anagram)) | ||
|
||
{{#test_cases.findAnagrams}} | ||
(deftest anagrams-for_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} | ||
(anagram/anagrams-for {{input.subject}} {{input.candidates}}))))) | ||
{{/test_cases.findAnagrams~}} | ||
{{/test_cases.findAnagrams}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns armstrong-numbers-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
armstrong-numbers)) | ||
|
||
{{#test_cases.isArmstrongNumber}} | ||
(deftest armstrong?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (armstrong-numbers/armstrong? {{input.number}}))))) | ||
{{/test_cases.isArmstrongNumber~}} | ||
{{/test_cases.isArmstrongNumber}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns darts-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
darts)) | ||
|
||
{{#test_cases.score}} | ||
(deftest score_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (darts/score {{input.x}} {{input.y}}))))) | ||
{{/test_cases.score~}} | ||
{{/test_cases.score}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
(ns difference-of-squares-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
difference-of-squares)) | ||
|
||
{{#test_cases.squareOfSum}} | ||
(deftest square-of-sum_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (difference-of-squares/square-of-sum {{input.number}}))))) | ||
{{/test_cases.squareOfSum~}} | ||
{{/test_cases.squareOfSum}} | ||
|
||
{{#test_cases.sumOfSquares}} | ||
(deftest sum-of-squares_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (difference-of-squares/sum-of-squares {{input.number}}))))) | ||
{{/test_cases.sumOfSquares~}} | ||
{{/test_cases.sumOfSquares}} | ||
|
||
{{#test_cases.differenceOfSquares}} | ||
(deftest difference_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (difference-of-squares/difference {{input.number}}))))) | ||
{{/test_cases.differenceOfSquares~}} | ||
{{/test_cases.differenceOfSquares}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
(ns high-scores-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
high-scores)) | ||
|
||
{{#test_cases.scores}} | ||
(deftest scores_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (high-scores/scores {{input.scores}}))))) | ||
{{/test_cases.scores~}} | ||
{{/test_cases.scores}} | ||
|
||
{{#test_cases.latest}} | ||
(deftest latest_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (high-scores/latest {{input.scores}}))))) | ||
{{/test_cases.latest~}} | ||
{{/test_cases.latest}} | ||
|
||
{{#test_cases.personalBest}} | ||
(deftest personal-best_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (high-scores/personal-best {{input.scores}}))))) | ||
{{/test_cases.personalBest~}} | ||
{{/test_cases.personalBest}} | ||
|
||
{{#test_cases.personalTopThree}} | ||
(deftest personal-top-three_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (high-scores/personal-top-three {{input.scores}}))))) | ||
{{/test_cases.personalTopThree~}} | ||
{{/test_cases.personalTopThree}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns isbn-verifier-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
isbn-verifier)) | ||
|
||
{{#test_cases.isValid}} | ||
(deftest isbn?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected~}}true?{{else}}false?{{/expected}} (isbn-verifier/isbn? {{input.isbn}}))))) | ||
{{/test_cases.isValid~}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (isbn-verifier/isbn? {{input.isbn}}))))) | ||
{{/test_cases.isValid}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns isogram-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
isogram)) | ||
|
||
{{#test_cases.isIsogram}} | ||
(deftest isogram?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected~}}true?{{else}}false?{{/expected}} (isogram/isogram? {{input.phrase}}))))) | ||
{{/test_cases.isIsogram~}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (isogram/isogram? {{input.phrase}}))))) | ||
{{/test_cases.isIsogram}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns leap-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
leap)) | ||
|
||
{{#test_cases.leapYear}} | ||
(deftest leap-year?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (leap/leap-year? {{input.year}}))))) | ||
{{/test_cases.leapYear~}} | ||
{{/test_cases.leapYear}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
(ns matrix-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
matrix)) | ||
|
||
{{#test_cases.row}} | ||
(deftest get-row_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (matrix/get-row {{input.string}} {{input.index}}))))) | ||
{{/test_cases.row~}} | ||
{{/test_cases.row}} | ||
|
||
{{#test_cases.column}} | ||
(deftest get-column_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (matrix/get-column {{input.string}} {{input.index}}))))) | ||
{{/test_cases.column~}} | ||
{{/test_cases.column}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns pangram-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
pangram)) | ||
|
||
{{#test_cases.isPangram}} | ||
(deftest pangram?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (pangram/pangram? {{input.sentence}}))))) | ||
{{/test_cases.isPangram~}} | ||
{{/test_cases.isPangram}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns pig-latin-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
pig-latin)) | ||
|
||
{{#test_cases.translate}} | ||
(deftest translate_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (pig-latin/translate {{input.phrase}}))))) | ||
{{/test_cases.translate~}} | ||
{{/test_cases.translate}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns resistor-color-duo-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
resistor-color-duo)) | ||
|
||
{{#test_cases.value}} | ||
(deftest resistor-value_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (resistor-color-duo/resistor-value {{input.colors}}))))) | ||
{{/test_cases.value~}} | ||
{{/test_cases.value}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
(ns resistor-color-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
resistor-color)) | ||
|
||
{{#test_cases.colors}} | ||
(deftest colors_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} | ||
resistor-color/colors)))) | ||
{{/test_cases.colors~}} | ||
{{/test_cases.colors}} | ||
|
||
{{#test_cases.colorCode}} | ||
(deftest color-code_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (resistor-color/color-code {{input.color}}))))) | ||
{{/test_cases.colorCode~}} | ||
{{/test_cases.colorCode}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns reverse-string-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
reverse-string)) | ||
|
||
{{#test_cases.reverse}} | ||
(deftest reverse-string_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (reverse-string/reverse-string {{input.value}}))))) | ||
{{/test_cases.reverse~}} | ||
{{/test_cases.reverse}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns roman-numerals-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
roman-numerals)) | ||
|
||
{{#test_cases.roman}} | ||
(deftest numerals_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (roman-numerals/numerals {{input.number}}))))) | ||
{{/test_cases.roman~}} | ||
{{/test_cases.roman}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
(ns saddle-points-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
saddle-points)) | ||
|
||
{{#test_cases.saddlePoints}} | ||
(deftest saddle-points_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} | ||
(saddle-points/saddle-points | ||
[{{~#input.matrix}} | ||
[{{#input.matrix}} | ||
{{.}} | ||
{{~/input.matrix}} | ||
]))))) | ||
{{/test_cases.saddlePoints~}} | ||
{{~/input.matrix}}]))))) | ||
{{/test_cases.saddlePoints}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns scrabble-score-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
scrabble-score)) | ||
|
||
{{#test_cases.score}} | ||
(deftest score-word_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (scrabble-score/score-word {{input.word}}))))) | ||
{{/test_cases.score~}} | ||
{{/test_cases.score}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns square-root-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
square-root)) | ||
|
||
{{#test_cases.squareRoot}} | ||
(deftest square-root_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (square-root/square-root {{input.radicand}}))))) | ||
{{/test_cases.squareRoot~}} | ||
{{/test_cases.squareRoot}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns sum-of-multiples-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
sum-of-multiples)) | ||
|
||
{{#test_cases.sum}} | ||
(deftest sum-of-multiples_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#ifzero expected}}zero?{{else}}= {{expected}}{{/ifzero}} (sum-of-multiples/sum-of-multiples {{input.factors}} {{input.limit}}))))) | ||
{{/test_cases.sum~}} | ||
{{/test_cases.sum}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
(ns triangle-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
triangle)) | ||
|
||
{{#test_cases.equilateral}} | ||
(deftest equilateral?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (triangle/equilateral? {{input.sides.0}} {{input.sides.1}} {{input.sides.2}}))))) | ||
{{/test_cases.equilateral~}} | ||
{{/test_cases.equilateral}} | ||
|
||
{{#test_cases.isosceles}} | ||
(deftest isosceles?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (triangle/isosceles? {{input.sides.0}} {{input.sides.1}} {{input.sides.2}}))))) | ||
{{/test_cases.isosceles~}} | ||
{{/test_cases.isosceles}} | ||
|
||
{{#test_cases.scalene}} | ||
(deftest scalene?_test_{{idx}} | ||
(testing {{description}} | ||
(is ({{#expected}}true?{{else}}false?{{/expected}} (triangle/scalene? {{input.sides.0}} {{input.sides.1}} {{input.sides.2}}))))) | ||
{{/test_cases.scalene~}} | ||
{{/test_cases.scalene}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(ns two-fer-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
two-fer)) | ||
|
||
{{#test_cases.twoFer}} | ||
(deftest two-fer_test_{{idx}} | ||
(testing {{description}} | ||
(is (= {{expected}} (two-fer/two-fer{{#input.name}} {{input.name}}{{/input.name}}))))) | ||
{{/test_cases.twoFer~}} | ||
{{/test_cases.twoFer}} |
Oops, something went wrong.