|
2 | 2 | (:require [clojure.test :refer [deftest testing is]] |
3 | 3 | high-scores)) |
4 | 4 |
|
5 | | -(deftest scores_test_1 |
| 5 | +(deftest ^:scores scores_test_1 |
6 | 6 | (testing "List of scores" |
7 | 7 | (is (= '(30 50 20 70) (high-scores/scores '(30 50 20 70)))))) |
8 | 8 |
|
9 | | -(deftest latest_test_1 |
| 9 | +(deftest ^:latest latest_test_1 |
10 | 10 | (testing "Latest score" |
11 | 11 | (is (= 30 (high-scores/latest '(100 0 90 30)))))) |
12 | 12 |
|
13 | | -(deftest personal-best_test_1 |
| 13 | +(deftest ^:personal-best personal-best_test_1 |
14 | 14 | (testing "Personal best" |
15 | 15 | (is (= 100 (high-scores/personal-best '(40 100 70)))))) |
16 | 16 |
|
17 | | -(deftest personal-top-three_test_1 |
| 17 | +(deftest ^:personal-top-three personal-top-three_test_1 |
18 | 18 | (testing "Top 3 scores ▶ Personal top three from a list of scores" |
19 | 19 | (is (= '(100 90 70) (high-scores/personal-top-three '(10 30 90 30 100 20 10 0 30 40 40 70 70)))))) |
20 | 20 |
|
21 | | -(deftest personal-top-three_test_2 |
| 21 | +(deftest ^:personal-top-three personal-top-three_test_2 |
22 | 22 | (testing "Top 3 scores ▶ Personal top highest to lowest" |
23 | 23 | (is (= '(30 20 10) (high-scores/personal-top-three '(20 10 30)))))) |
24 | 24 |
|
25 | | -(deftest personal-top-three_test_3 |
| 25 | +(deftest ^:personal-top-three personal-top-three_test_3 |
26 | 26 | (testing "Top 3 scores ▶ Personal top when there is a tie" |
27 | 27 | (is (= '(40 40 30) (high-scores/personal-top-three '(40 20 40 30)))))) |
28 | 28 |
|
29 | | -(deftest personal-top-three_test_4 |
| 29 | +(deftest ^:personal-top-three personal-top-three_test_4 |
30 | 30 | (testing "Top 3 scores ▶ Personal top when there are less than 3" |
31 | 31 | (is (= '(70 30) (high-scores/personal-top-three '(30 70)))))) |
32 | 32 |
|
33 | | -(deftest personal-top-three_test_5 |
| 33 | +(deftest ^:personal-top-three personal-top-three_test_5 |
34 | 34 | (testing "Top 3 scores ▶ Personal top when there is only one" |
35 | 35 | (is (= '(40) (high-scores/personal-top-three '(40)))))) |
0 commit comments