|
16 | 16 | '())
|
17 | 17 |
|
18 | 18 | (test-equal? "detects two anagrams"
|
19 |
| - (anagrams-for "solemn" |
20 |
| - '("lemons" "cherry" "melons")) |
| 19 | + (sort (anagrams-for "solemn" |
| 20 | + '("lemons" "cherry" "melons")) |
| 21 | + string<?) |
21 | 22 | '("lemons" "melons"))
|
22 | 23 |
|
23 | 24 | (test-equal? "does not detect anagram subsets"
|
|
31 | 32 | '("inlets"))
|
32 | 33 |
|
33 | 34 | (test-equal? "detects three anagrams"
|
34 |
| - (anagrams-for "allergy" |
35 |
| - '("gallery" "ballerina" "regally" "clergy" "largely" "leading")) |
36 |
| - '("gallery" "regally" "largely")) |
| 35 | + (sort (anagrams-for "allergy" |
| 36 | + '("gallery" |
| 37 | + "ballerina" |
| 38 | + "regally" |
| 39 | + "clergy" |
| 40 | + "largely" |
| 41 | + "leading")) |
| 42 | + string<?) |
| 43 | + |
| 44 | + '("gallery" "largely" "regally")) |
37 | 45 |
|
38 | 46 | (test-equal? "detects multiple anagrams with different case"
|
39 |
| - (anagrams-for "nose" |
40 |
| - '("Eons" "ONES")) |
| 47 | + (sort (anagrams-for "nose" |
| 48 | + '("Eons" "ONES")) |
| 49 | + string<?) |
41 | 50 | '("Eons" "ONES"))
|
42 | 51 |
|
43 | 52 | (test-equal? "does not detect non-anagrams with identical checksum"
|
|
50 | 59 | '("cashregister" "Carthorse" "radishes"))
|
51 | 60 | '("Carthorse"))
|
52 | 61 |
|
53 |
| - (test-equal? "detects anagrams using case-insensitive subject" |
| 62 | + (test-equal? "detects anagrams using case-insensitive subject" |
54 | 63 | (anagrams-for "Orchestra"
|
55 | 64 | '("cashregister" "carthorse" "radishes"))
|
56 | 65 | '("carthorse"))
|
57 | 66 |
|
58 |
| - (test-equal? "detects anagrams using case-insensitive possible matches" |
| 67 | + (test-equal? "detects anagrams using case-insensitive possible matches" |
59 | 68 | (anagrams-for "orchestra"
|
60 | 69 | '("cashregister" "Carthorse" "radishes"))
|
61 | 70 | '("Carthorse"))
|
|
65 | 74 | '("goGoGO"))
|
66 | 75 | '())
|
67 | 76 |
|
68 |
| - (test-equal? "anagrams must use all letters exactly once" |
| 77 | + (test-equal? "anagrams must use all letters exactly once" |
69 | 78 | (anagrams-for "tapper"
|
70 | 79 | '("patter"))
|
71 | 80 | '())
|
72 | 81 |
|
73 |
| - (test-equal? "words are not anagrams of themselves" |
| 82 | + (test-equal? "words are not anagrams of themselves" |
74 | 83 | (anagrams-for "BANANA"
|
75 | 84 | '("BANANA"))
|
76 | 85 | '())
|
77 | 86 |
|
78 |
| - (test-equal? "words are not anagrams of themselves even if letter case is partially different" |
| 87 | + (test-equal? "words are not anagrams of themselves even if letter case is partially different" |
79 | 88 | (anagrams-for "BANANA"
|
80 | 89 | '("Banana"))
|
81 | 90 | '())
|
82 | 91 |
|
83 |
| - (test-equal? "words are not anagrams of themselves even if letter case is completely different" |
| 92 | + (test-equal? "words are not anagrams of themselves even if letter case is completely different" |
84 | 93 | (anagrams-for "BANANA"
|
85 | 94 | '("banana"))
|
86 | 95 | '())
|
87 | 96 |
|
88 |
| - |
89 | 97 | (test-equal? "words other than themselves can be anagrams"
|
90 | 98 | (anagrams-for "LISTEN"
|
91 | 99 | '("LISTEN" "Silent"))
|
|
0 commit comments