Skip to content

Ambiguity in some test cases for the anagram problem #690

@Anmol-Sharma

Description

@Anmol-Sharma

In the anagram problem of the problem set, there are two conflicting test sets, namely test_case_insensitive_anagrams and test_does_not_detect_a_differently_cased_word_as_its_own_anagram.

The testcase for former is :

#[test]
#[ignore]
fn test_case_insensitive_anagrams() {
    let word = "Orchestra";

    let inputs = ["cashregister", "Carthorse", "radishes"];

    let outputs = vec!["Carthorse"];

    process_anagram_case(word, &inputs, &outputs);
}

While the test case for latter is :

#[test]
#[ignore]
fn test_does_not_detect_a_differently_cased_word_as_its_own_anagram() {
    let word = "banana";

    let inputs = ["bAnana"];

    let outputs = vec![];

    process_anagram_case(word, &inputs, &outputs);
}

You can only pass either of these, and not both due to the conflicting nature of both. So i think this will require a fix to remove one of these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions