I'm working on the anagram problem and my code is failing on these three tests:
#[test]
fn test_does_not_detect_a_word_as_its_own_anagram() {
let inputs = ["banana"];
let outputs: Vec<&str> = vec![];
assert_eq!(anagram::anagrams_for("banana", &inputs), outputs);
}
#[test]
fn test_does_not_detect_a_differently_cased_word_as_its_own_anagram() {
let inputs = ["bAnana"];
let outputs: Vec<&str> = vec![];
assert_eq!(anagram::anagrams_for("banana", &inputs), outputs);
}
#[test]
fn test_does_not_detect_a_differently_cased_unicode_word_as_its_own_anagram() {
let inputs = ["ΑΒγ"];
let outputs: Vec<&str> = vec![];
assert_eq!(anagram::anagrams_for("ΑΒΓ", &inputs), outputs);
}
I think these tests should actually be panic because these assertions are not true if considering case insensitive code for the latter two and simply because there's no output for the trivial case of a self-describing anagram.
Perhaps I'm missing something, but I was hoping these could be addressed somehow.
I'm working on the anagram problem and my code is failing on these three tests:
I think these tests should actually be
panicbecause these assertions are not true if considering case insensitive code for the latter two and simply because there's no output for the trivial case of a self-describing anagram.Perhaps I'm missing something, but I was hoping these could be addressed somehow.