Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions exercises/practice/anagram/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ description = "detects anagrams using case-insensitive possible matches"

[7cc195ad-e3c7-44ee-9fd2-d3c344806a2c]
description = "does not detect an anagram if the original word is repeated"
include = false

[630abb71-a94e-4715-8395-179ec1df9f91]
description = "does not detect an anagram if the original word is repeated"
reimplements = "7cc195ad-e3c7-44ee-9fd2-d3c344806a2c"

[9878a1c9-d6ea-4235-ae51-3ea2befd6842]
description = "anagrams must use all letters exactly once"
Expand Down Expand Up @@ -73,3 +78,9 @@ include = false
[33d3f67e-fbb9-49d3-a90e-0beb00861da7]
description = "words other than themselves can be anagrams"
reimplements = "a0705568-628c-4b55-9798-82e4acde51ca"

[a6854f66-eec1-4afd-a137-62ef2870c051]
description = "handles case of greek letters"

[fd3509e5-e3ba-409d-ac3d-a9ac84d13296]
description = "different characters may have the same bytes"
12 changes: 11 additions & 1 deletion exercises/practice/anagram/AnagramTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let ``Detects anagrams using case-insensitive possible matches`` () =

[<Fact(Skip = "Remove this Skip property to run this test")>]
let ``Does not detect an anagram if the original word is repeated`` () =
let candidates = ["go Go GO"]
let candidates = ["goGoGO"]
findAnagrams candidates "go" |> should be Empty

[<Fact(Skip = "Remove this Skip property to run this test")>]
Expand Down Expand Up @@ -85,3 +85,13 @@ let ``Words other than themselves can be anagrams`` () =
let candidates = ["LISTEN"; "Silent"]
findAnagrams candidates "LISTEN" |> should equal ["Silent"]

[<Fact(Skip = "Remove this Skip property to run this test")>]
let ``Handles case of greek letters`` () =
let candidates = ["ΒΓΑ"; "ΒΓΔ"; "γβα"; "αβγ"]
findAnagrams candidates "ΑΒΓ" |> should equal ["ΒΓΑ"; "γβα"]

[<Fact(Skip = "Remove this Skip property to run this test")>]
let ``Different characters may have the same bytes`` () =
let candidates = ["€a"]
findAnagrams candidates "a⬂" |> should be Empty