Skip to content

Forgotten (failing!) Soundex Test #4

@ajneu

Description

@ajneu

Hi,

this test was forgotten and fails:

TEST_F(SoundexEncoding, ForgetMeNot)
{
  ASSERT_THAT(soundex.encode("bahb"), Eq("B100"));
}

https://www.wolframalpha.com/input/?i=Soundex+bahb

It's not enough to just check the last character (ref).

Then there are also special corner cases, which according to Wolfram Soundex are:

TEST_F(SoundexEncoding, Corner)
{
  ASSERT_THAT(soundex.encode("Aaabwhwb"), Eq("A110"));
  ASSERT_THAT(soundex.encode("Aaabhwhb"), Eq("A110"));
}

https://www.wolframalpha.com/input/?i=Soundex+Aaabwhwb
https://www.wolframalpha.com/input/?i=Soundex+Aaabhwhb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions