Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
"there are 17 sheeps in total"
is the string shown in the error message, the answer is a number.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 ofexpect
.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.
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.
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.