Skip to content

Commit

Permalink
Update description separator to (#779)
Browse files Browse the repository at this point in the history
[no important files changed]
  • Loading branch information
ErikSchierboom authored Jan 18, 2025
1 parent 1f0fc5c commit fa6ca30
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
10 changes: 5 additions & 5 deletions exercises/practice/high-scores/test/high_scores_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
(is (= 100 (high-scores/personal-best '(40 100 70))))))

(deftest personal-top-three_test_1
(testing "Top 3 scores - Personal top three from a list of scores"
(testing "Top 3 scores Personal top three from a list of scores"
(is (= '(100 90 70) (high-scores/personal-top-three '(10 30 90 30 100 20 10 0 30 40 40 70 70))))))

(deftest personal-top-three_test_2
(testing "Top 3 scores - Personal top highest to lowest"
(testing "Top 3 scores Personal top highest to lowest"
(is (= '(30 20 10) (high-scores/personal-top-three '(20 10 30))))))

(deftest personal-top-three_test_3
(testing "Top 3 scores - Personal top when there is a tie"
(testing "Top 3 scores Personal top when there is a tie"
(is (= '(40 40 30) (high-scores/personal-top-three '(40 20 40 30))))))

(deftest personal-top-three_test_4
(testing "Top 3 scores - Personal top when there are less than 3"
(testing "Top 3 scores Personal top when there are less than 3"
(is (= '(70 30) (high-scores/personal-top-three '(30 70))))))

(deftest personal-top-three_test_5
(testing "Top 3 scores - Personal top when there is only one"
(testing "Top 3 scores Personal top when there is only one"
(is (= '(40) (high-scores/personal-top-three '(40))))))
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
resistor-color/colors))))

(deftest color-code_test_1
(testing "Color codes - Black"
(testing "Color codes Black"
(is (= 0 (resistor-color/color-code "black")))))

(deftest color-code_test_2
(testing "Color codes - White"
(testing "Color codes White"
(is (= 9 (resistor-color/color-code "white")))))

(deftest color-code_test_3
(testing "Color codes - Orange"
(testing "Color codes Orange"
(is (= 3 (resistor-color/color-code "orange")))))
42 changes: 21 additions & 21 deletions exercises/practice/triangle/test/triangle_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,85 @@
triangle))

(deftest equilateral?_test_1
(testing "equilateral triangle - all sides are equal"
(testing "equilateral triangle all sides are equal"
(is (true? (triangle/equilateral? 2 2 2)))))

(deftest equilateral?_test_2
(testing "equilateral triangle - any side is unequal"
(testing "equilateral triangle any side is unequal"
(is (false? (triangle/equilateral? 2 3 2)))))

(deftest equilateral?_test_3
(testing "equilateral triangle - no sides are equal"
(testing "equilateral triangle no sides are equal"
(is (false? (triangle/equilateral? 5 4 6)))))

(deftest equilateral?_test_4
(testing "equilateral triangle - all zero sides is not a triangle"
(testing "equilateral triangle all zero sides is not a triangle"
(is (false? (triangle/equilateral? 0 0 0)))))

(deftest equilateral?_test_5
(testing "equilateral triangle - sides may be floats"
(testing "equilateral triangle sides may be floats"
(is (true? (triangle/equilateral? 0.5 0.5 0.5)))))

(deftest isosceles?_test_1
(testing "isosceles triangle - last two sides are equal"
(testing "isosceles triangle last two sides are equal"
(is (true? (triangle/isosceles? 3 4 4)))))

(deftest isosceles?_test_2
(testing "isosceles triangle - first two sides are equal"
(testing "isosceles triangle first two sides are equal"
(is (true? (triangle/isosceles? 4 4 3)))))

(deftest isosceles?_test_3
(testing "isosceles triangle - first and last sides are equal"
(testing "isosceles triangle first and last sides are equal"
(is (true? (triangle/isosceles? 4 3 4)))))

(deftest isosceles?_test_4
(testing "isosceles triangle - equilateral triangles are also isosceles"
(testing "isosceles triangle equilateral triangles are also isosceles"
(is (true? (triangle/isosceles? 4 4 4)))))

(deftest isosceles?_test_5
(testing "isosceles triangle - no sides are equal"
(testing "isosceles triangle no sides are equal"
(is (false? (triangle/isosceles? 2 3 4)))))

(deftest isosceles?_test_6
(testing "isosceles triangle - first triangle inequality violation"
(testing "isosceles triangle first triangle inequality violation"
(is (false? (triangle/isosceles? 1 1 3)))))

(deftest isosceles?_test_7
(testing "isosceles triangle - second triangle inequality violation"
(testing "isosceles triangle second triangle inequality violation"
(is (false? (triangle/isosceles? 1 3 1)))))

(deftest isosceles?_test_8
(testing "isosceles triangle - third triangle inequality violation"
(testing "isosceles triangle third triangle inequality violation"
(is (false? (triangle/isosceles? 3 1 1)))))

(deftest isosceles?_test_9
(testing "isosceles triangle - sides may be floats"
(testing "isosceles triangle sides may be floats"
(is (true? (triangle/isosceles? 0.5 0.4 0.5)))))

(deftest scalene?_test_1
(testing "scalene triangle - no sides are equal"
(testing "scalene triangle no sides are equal"
(is (true? (triangle/scalene? 5 4 6)))))

(deftest scalene?_test_2
(testing "scalene triangle - all sides are equal"
(testing "scalene triangle all sides are equal"
(is (false? (triangle/scalene? 4 4 4)))))

(deftest scalene?_test_3
(testing "scalene triangle - first and second sides are equal"
(testing "scalene triangle first and second sides are equal"
(is (false? (triangle/scalene? 4 4 3)))))

(deftest scalene?_test_4
(testing "scalene triangle - first and third sides are equal"
(testing "scalene triangle first and third sides are equal"
(is (false? (triangle/scalene? 3 4 3)))))

(deftest scalene?_test_5
(testing "scalene triangle - second and third sides are equal"
(testing "scalene triangle second and third sides are equal"
(is (false? (triangle/scalene? 4 3 3)))))

(deftest scalene?_test_6
(testing "scalene triangle - may not violate triangle inequality"
(testing "scalene triangle may not violate triangle inequality"
(is (false? (triangle/scalene? 7 3 2)))))

(deftest scalene?_test_7
(testing "scalene triangle - sides may be floats"
(testing "scalene triangle sides may be floats"
(is (true? (triangle/scalene? 0.5 0.4 0.6)))))
30 changes: 15 additions & 15 deletions exercises/practice/twelve-days/test/twelve_days_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,91 @@
twelve-days))

(deftest recite_test_1
(testing "verse - first day a partridge in a pear tree"
(testing "verse first day a partridge in a pear tree"
(is (= (twelve-days/recite 1 1)
[
"On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree."
]))))

(deftest recite_test_2
(testing "verse - second day two turtle doves"
(testing "verse second day two turtle doves"
(is (= (twelve-days/recite 2 2)
[
"On the second day of Christmas my true love gave to me: two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_3
(testing "verse - third day three french hens"
(testing "verse third day three french hens"
(is (= (twelve-days/recite 3 3)
[
"On the third day of Christmas my true love gave to me: three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_4
(testing "verse - fourth day four calling birds"
(testing "verse fourth day four calling birds"
(is (= (twelve-days/recite 4 4)
[
"On the fourth day of Christmas my true love gave to me: four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_5
(testing "verse - fifth day five gold rings"
(testing "verse fifth day five gold rings"
(is (= (twelve-days/recite 5 5)
[
"On the fifth day of Christmas my true love gave to me: five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_6
(testing "verse - sixth day six geese-a-laying"
(testing "verse sixth day six geese-a-laying"
(is (= (twelve-days/recite 6 6)
[
"On the sixth day of Christmas my true love gave to me: six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_7
(testing "verse - seventh day seven swans-a-swimming"
(testing "verse seventh day seven swans-a-swimming"
(is (= (twelve-days/recite 7 7)
[
"On the seventh day of Christmas my true love gave to me: seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_8
(testing "verse - eighth day eight maids-a-milking"
(testing "verse eighth day eight maids-a-milking"
(is (= (twelve-days/recite 8 8)
[
"On the eighth day of Christmas my true love gave to me: eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_9
(testing "verse - ninth day nine ladies dancing"
(testing "verse ninth day nine ladies dancing"
(is (= (twelve-days/recite 9 9)
[
"On the ninth day of Christmas my true love gave to me: nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_10
(testing "verse - tenth day ten lords-a-leaping"
(testing "verse tenth day ten lords-a-leaping"
(is (= (twelve-days/recite 10 10)
[
"On the tenth day of Christmas my true love gave to me: ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_11
(testing "verse - eleventh day eleven pipers piping"
(testing "verse eleventh day eleven pipers piping"
(is (= (twelve-days/recite 11 11)
[
"On the eleventh day of Christmas my true love gave to me: eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_12
(testing "verse - twelfth day twelve drummers drumming"
(testing "verse twelfth day twelve drummers drumming"
(is (= (twelve-days/recite 12 12)
[
"On the twelfth day of Christmas my true love gave to me: twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]))))

(deftest recite_test_13
(testing "lyrics - recites first three verses of the song"
(testing "lyrics recites first three verses of the song"
(is (= (twelve-days/recite 1 3)
[
"On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree."
Expand All @@ -96,7 +96,7 @@
]))))

(deftest recite_test_14
(testing "lyrics - recites three verses from the middle of the song"
(testing "lyrics recites three verses from the middle of the song"
(is (= (twelve-days/recite 4 6)
[
"On the fourth day of Christmas my true love gave to me: four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
Expand All @@ -105,7 +105,7 @@
]))))

(deftest recite_test_15
(testing "lyrics - recites the whole song"
(testing "lyrics recites the whole song"
(is (= (twelve-days/recite 1 12)
[
"On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree."
Expand Down
2 changes: 1 addition & 1 deletion generators/src/templates.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(defn- test-case->data [idx node]
(-> node
(assoc :idx (inc idx)
:description (str/join " - " (:path node))
:description (str/join " " (:path node))
:error (get-in node [:expected :error]))
(dissoc :reimplements :comments :scenarios)))

Expand Down

0 comments on commit fa6ca30

Please sign in to comment.