File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
using namespace std ;
5
5
6
- // Anagram exercise test case data version 1.4 .0
6
+ // Anagram exercise test case data version 1.5 .0
7
7
8
8
TEST_CASE (" no_matches" )
9
9
{
@@ -59,6 +59,15 @@ TEST_CASE("detects_three_anagrams")
59
59
REQUIRE (expected == matches);
60
60
}
61
61
62
+ TEST_CASE (" detects_multiple_anagrams_with_different_case" )
63
+ {
64
+ auto subject = anagram::anagram (" nose" );
65
+ auto matches = subject.matches ({" Eons" , " ONES" });
66
+ vector<string> expected{" Eons" , " ONES" };
67
+
68
+ REQUIRE (expected == matches);
69
+ }
70
+
62
71
TEST_CASE (" does_not_detect_non_anagrams_with_identical_checksum" )
63
72
{
64
73
auto subject = anagram::anagram (" mass" );
@@ -121,4 +130,13 @@ TEST_CASE("words_are_not_anagrams_of_themselves_case_insensitive")
121
130
122
131
REQUIRE (expected == matches);
123
132
}
133
+
134
+ TEST_CASE (" words_other_than_themselves_can_be_anagrams" )
135
+ {
136
+ auto subject = anagram::anagram (" LISTEN" );
137
+ auto matches = subject.matches ({" Listen" , " Silent" , " LISTEN" });
138
+ vector<string> expected{" Silent" };
139
+
140
+ REQUIRE (expected == matches);
141
+ }
124
142
#endif
You can’t perform that action at this time.
0 commit comments