Ad
  • Custom User Avatar

    The test that expects "ya" has "z" too, but "ya" is before and therefore is the right expected answer.
    Try using this: std::cout << "* Debug " << "'" << str << "'" << std::endl; when the tests pass, the input will show one after the other, the last one above the error message is the one your code is failing.

  • Custom User Avatar

    Well no but similar you have a string with words giving the same score like ya and z. The word first mentioned in the string has to be first in order. So as in the above Assert you have to print z. Which it does.
    But in the edge test I have a similar string with z being in an earlier position in the string than "ya", which has the same score as "z". This test fails, but I don't know why

  • Custom User Avatar

    You're mixing some tests there, there is no test like that in the Edge Tests.

  • Custom User Avatar

    Hi,
    I am using C++ for the coding challenge and I still get a fault with the advanced tests, although I made one of the advanced tests myself in the challenge were it passes.
    Expected: equal to z
    Actual: ya
    So I made a test with these words:
    Assert::That(highestScoringWord("abc f e d z ya"), Equals("z"));
    That one is successful. But in the advanced tests it still fails???