Skip to content

Commit

Permalink
Merge pull request #1552 from marko213/anagram-patch
Browse files Browse the repository at this point in the history
Anagram - add test cases for differently-cased words
  • Loading branch information
kotp authored Jul 15, 2019
2 parents 47a0970 + 49a36fe commit 4f6e240
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion exercises/anagram/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exercise": "anagram",
"version": "1.4.1",
"version": "1.5.0",
"cases": [
{
"description": "no matches",
Expand Down Expand Up @@ -54,6 +54,15 @@
},
"expected": ["gallery", "regally", "largely"]
},
{
"description": "detects multiple anagrams with different case",
"property": "findAnagrams",
"input": {
"subject": "nose",
"candidates": ["Eons", "ONES"]
},
"expected": ["Eons", "ONES"]
},
{
"description": "does not detect non-anagrams with identical checksum",
"property": "findAnagrams",
Expand Down Expand Up @@ -116,6 +125,15 @@
"candidates": ["BANANA", "Banana", "banana"]
},
"expected": []
},
{
"description": "words other than themselves can be anagrams",
"property": "findAnagrams",
"input": {
"subject": "LISTEN",
"candidates": ["Listen", "Silent", "LISTEN"]
},
"expected": ["Silent"]
}
]
}

0 comments on commit 4f6e240

Please sign in to comment.