|
2 | 2 | (:require [clojure.test :refer [deftest testing is]] |
3 | 3 | run-length-encoding)) |
4 | 4 |
|
5 | | -(deftest run-length-encode_test_1 |
| 5 | +(deftest ^:run-length-encode run-length-encode_test_1 |
6 | 6 | (testing "run-length encode a string ▶ empty string" |
7 | 7 | (is (= "" |
8 | 8 | (run-length-encoding/run-length-encode ""))))) |
9 | 9 |
|
10 | | -(deftest run-length-encode_test_2 |
| 10 | +(deftest ^:run-length-encode run-length-encode_test_2 |
11 | 11 | (testing "run-length encode a string ▶ single characters only are encoded without count" |
12 | 12 | (is (= "XYZ" |
13 | 13 | (run-length-encoding/run-length-encode "XYZ"))))) |
14 | 14 |
|
15 | | -(deftest run-length-encode_test_3 |
| 15 | +(deftest ^:run-length-encode run-length-encode_test_3 |
16 | 16 | (testing "run-length encode a string ▶ string with no single characters" |
17 | 17 | (is (= "2A3B4C" |
18 | 18 | (run-length-encoding/run-length-encode "AABBBCCCC"))))) |
19 | 19 |
|
20 | | -(deftest run-length-encode_test_4 |
| 20 | +(deftest ^:run-length-encode run-length-encode_test_4 |
21 | 21 | (testing "run-length encode a string ▶ single characters mixed with repeated characters" |
22 | 22 | (is (= "12WB12W3B24WB" |
23 | 23 | (run-length-encoding/run-length-encode "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"))))) |
24 | 24 |
|
25 | | -(deftest run-length-encode_test_5 |
| 25 | +(deftest ^:run-length-encode run-length-encode_test_5 |
26 | 26 | (testing "run-length encode a string ▶ multiple whitespace mixed in string" |
27 | 27 | (is (= "2 hs2q q2w2 " |
28 | 28 | (run-length-encoding/run-length-encode " hsqq qww "))))) |
29 | 29 |
|
30 | | -(deftest run-length-encode_test_6 |
| 30 | +(deftest ^:run-length-encode run-length-encode_test_6 |
31 | 31 | (testing "run-length encode a string ▶ lowercase characters" |
32 | 32 | (is (= "2a3b4c" |
33 | 33 | (run-length-encoding/run-length-encode "aabbbcccc"))))) |
34 | 34 |
|
35 | | -(deftest run-length-decode_test_1 |
| 35 | +(deftest ^:run-length-decode run-length-decode_test_1 |
36 | 36 | (testing "run-length decode a string ▶ empty string" |
37 | 37 | (is (= "" |
38 | 38 | (run-length-encoding/run-length-decode ""))))) |
39 | 39 |
|
40 | | -(deftest run-length-decode_test_2 |
| 40 | +(deftest ^:run-length-decode run-length-decode_test_2 |
41 | 41 | (testing "run-length decode a string ▶ single characters only" |
42 | 42 | (is (= "XYZ" |
43 | 43 | (run-length-encoding/run-length-decode "XYZ"))))) |
44 | 44 |
|
45 | | -(deftest run-length-decode_test_3 |
| 45 | +(deftest ^:run-length-decode run-length-decode_test_3 |
46 | 46 | (testing "run-length decode a string ▶ string with no single characters" |
47 | 47 | (is (= "AABBBCCCC" |
48 | 48 | (run-length-encoding/run-length-decode "2A3B4C"))))) |
49 | 49 |
|
50 | | -(deftest run-length-decode_test_4 |
| 50 | +(deftest ^:run-length-decode run-length-decode_test_4 |
51 | 51 | (testing "run-length decode a string ▶ single characters with repeated characters" |
52 | 52 | (is (= "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" |
53 | 53 | (run-length-encoding/run-length-decode "12WB12W3B24WB"))))) |
54 | 54 |
|
55 | | -(deftest run-length-decode_test_5 |
| 55 | +(deftest ^:run-length-decode run-length-decode_test_5 |
56 | 56 | (testing "run-length decode a string ▶ multiple whitespace mixed in string" |
57 | 57 | (is (= " hsqq qww " |
58 | 58 | (run-length-encoding/run-length-decode "2 hs2q q2w2 "))))) |
59 | 59 |
|
60 | | -(deftest run-length-decode_test_6 |
| 60 | +(deftest ^:run-length-decode run-length-decode_test_6 |
61 | 61 | (testing "run-length decode a string ▶ lowercase string" |
62 | 62 | (is (= "aabbbcccc" |
63 | 63 | (run-length-encoding/run-length-decode "2a3b4c"))))) |
0 commit comments