Skip to content

Commit 292ae56

Browse files
Update template
1 parent 6db887c commit 292ae56

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

config.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,10 @@
677677
"name": "High Scores",
678678
"uuid": "e0e4006a-7720-4ef9-adf1-95c19b93284d",
679679
"practices": [],
680-
"prerequisites": [],
680+
"prerequisites": [
681+
"lists",
682+
"numbers"
683+
],
681684
"difficulty": 2
682685
},
683686
{

exercises/practice/high-scores/.meta/generator.tpl

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
high-scores))
44
{{#test_cases.scores}}
55
(deftest scores_test_{{idx}}
6-
(testing "{{description}}"
7-
(is (= {{expected}} (high-scores/scores {{input.scores}})))))
6+
(testing {{string description}}
7+
(is (= {{list expected}} (high-scores/scores {{list input.scores}})))))
88
{{/test_cases.scores~}}
99
{{#test_cases.latest}}
1010
(deftest latest_test_{{idx}}
11-
(testing "{{description}}"
12-
(is (= {{expected}} (high-scores/latest {{input.scores}})))))
11+
(testing {{string description}}
12+
(is (= {{expected}} (high-scores/latest {{list input.scores}})))))
1313
{{/test_cases.latest~}}
1414
{{#test_cases.personalBest}}
1515
(deftest personal-best_test_{{idx}}
16-
(testing "{{description}}"
17-
(is (= {{expected}} (high-scores/personal-best {{input.scores}})))))
16+
(testing {{string description}}
17+
(is (= {{expected}} (high-scores/personal-best {{list input.scores}})))))
1818
{{/test_cases.personalBest~}}
1919
{{#test_cases.personalTopThree}}
2020
(deftest personal-top-three_test_{{idx}}
21-
(testing "{{description}}"
22-
(is (= {{expected}} (high-scores/personal-top-three {{input.scores}})))))
21+
(testing {{string description}}
22+
(is (= {{list expected}} (high-scores/personal-top-three {{list input.scores}})))))
2323
{{/test_cases.personalTopThree~}}

exercises/practice/high-scores/test/high_scores_test.clj

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44

55
(deftest scores_test_1
66
(testing "List of scores"
7-
(is (= [30 50 20 70] (high-scores/scores [30 50 20 70])))))
7+
(is (= '(30 50 20 70) (high-scores/scores '(30 50 20 70))))))
88

99
(deftest latest_test_1
1010
(testing "Latest score"
11-
(is (= 30 (high-scores/latest [100 0 90 30])))))
11+
(is (= 30 (high-scores/latest '(100 0 90 30))))))
1212

1313
(deftest personal-best_test_1
1414
(testing "Personal best"
15-
(is (= 100 (high-scores/personal-best [40 100 70])))))
15+
(is (= 100 (high-scores/personal-best '(40 100 70))))))
1616

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

2121
(deftest personal-top-three_test_2
2222
(testing "Top 3 scores - Personal top highest to lowest"
23-
(is (= [30 20 10] (high-scores/personal-top-three [20 10 30])))))
23+
(is (= '(30 20 10) (high-scores/personal-top-three '(20 10 30))))))
2424

2525
(deftest personal-top-three_test_3
2626
(testing "Top 3 scores - Personal top when there is a tie"
27-
(is (= [40 40 30] (high-scores/personal-top-three [40 20 40 30])))))
27+
(is (= '(40 40 30) (high-scores/personal-top-three '(40 20 40 30))))))
2828

2929
(deftest personal-top-three_test_4
3030
(testing "Top 3 scores - Personal top when there are less than 3"
31-
(is (= [70 30] (high-scores/personal-top-three [30 70])))))
31+
(is (= '(70 30) (high-scores/personal-top-three '(30 70))))))
3232

3333
(deftest personal-top-three_test_5
3434
(testing "Top 3 scores - Personal top when there is only one"
35-
(is (= [40] (high-scores/personal-top-three [40])))))
35+
(is (= '(40) (high-scores/personal-top-three '(40))))))

0 commit comments

Comments
 (0)