I'm having the same issue. Only case that doesn't work is the main test for NaN. Strings that evaluate to numbers work. How can I fix this??
EDIT - figured it out! Phew, sorry for the panic :P. Had fun on this one!
Hi, Thanks for responding.
Yep, turns out i was checking for NaN incorrectly. Was getting confused why strings were not appropriate for raising an error, but I see now that the kata description says "non-numbers - Strings that evaluate to numbers should be converted to numbers. NaN values must throw an error. "
Thanks for the tip about the tests - that got me unstuck.
Could you elaborate what errors you're getting and what it means that 'NaN test does not respond successfully' ? How would anyone fix such vague issue?
Maybe you're checking for NaN incorectly, or my guess is that you're throwing an error for non-NaNs. By looking at the tests, I think there's only 1 NaN test.
The NaN test is not working. The sample NaN test is successful, but the main NaN test does not respond successfully with the same code.
I am throwing an error like this: throw "this is an error message"
throw "this is an error message"
Please fix. Thanks!
Usually, an user with 4000 or more honor, can approve/reject a translation. The kata author can approve/reject a translation too, regardless of honor.
will try it tomorrow.. BTW thanks for pointing out. :)
If you want to go one level further, try this :D (your feedback on whether it's duplicate or not would be helpful there)
Interesting one :)
I think you need to add specification for infinity - you said the input will be <2 Quadrillion but infinity exceeds this limit.
It looks even scarier now, with all these zeros :P
Good catch! I fixed it.
Counting in English one, two, three... to 2 Quadrillion (2,000,000,000,000)
What you wrote is 2 Trillion and not 2 Quadrillion
This was my first time implementing random tests in a kata so I used another reputable author's kata as reference to avoid messing things up.
Basically, it will compare the output from the user's solution against the output from the kata author's solution, using the same randomly generated input value. Perhaps someone with more knowledge/experience can provide a better answer.