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.
I'm getting the same error (in Java) and am passing the test case in description. Any other hints about what this test case is looking for?
No worries! I really didn't think there was anything you could do about it, but I'd thought I'd leave it here, just in case someone else is struggling with the same thing.
Thanks!
No, I've solved it. I'm saying that the arguments passed to the test cases are in the wrong order. The actual result your code produces is listed under the "expected" category, and the expected time is listed under the "saw" category.
So you have this:
assertEquals(NthSeries.seriesSum(5), "1.57");
When it should be:
assertEquals("1.57", NthSeries.seriesSum(5));
That's all.
Oh, it seemed to have erased part of the error message I copied in:
When I failed the first test case, I received this message:
test1(NthSeriesTest)
expected: 1.[68] but was: 1.57
This, to me, reads that the test case was expecting 1.68, and my code was producing 1.57; however, it was the other way around: 1.68 is what my code was producing, while 1.57 was what the test case is looking for. So basically I spent a lot of time trying to figure out why my solution was producing 1.68 locally, but failing the test case online... It's just my two cents. Trying to keep others from making my mistakes.
Java.
I believe the arguments in the test cases are in the wrong order.
test1(NthSeriesTest)
expected:<1.[68]> but was:<1.[57]>
1.68 is what my code was producing, while 1.57 was what the test case is looking for. Just so you know.
Also, from the examples, I thought the series was part of the string that was returned "1 + ... = "1.57"", so it took me a long time to figure out why I was failing test cases. Maybe you could make that part a little more clear?
Otherwise, great kata.