Ad
  • Custom User Avatar
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    "there are 17 sheeps in total" is the string shown in the error message, the answer is a number.

    Test.expect(countSheeps(array1) == 17, "There are 17 sheeps in total")
    

    You can see in the sample test, your function's returned value is compared against a number (17).
    That being said, yes, assertEquals should be used instead of expect.

  • Custom User Avatar

    you might want to clarify what you want for the answer in the test cases it says something like
    "there are 17 sheeps in total" while in the actual discription it says "The correct answer would be 17."
    even though i got the correct answer the first time through it would not except it because the test case would tell me it was looking for "there are 17 sheeps in total" while it just wanted the number 17.

  • Custom User Avatar

    While I was testing this in PHP i found there is an issue with how the tests are set up. They are running all of the tests at once instead of just one test at a time till the end.

  • Custom User Avatar

    C++ tested and passed while it using the "tests" then failed when doing "attempt". also more test cases will help see what exactly you are looking for.