the ref solution is incorrect, because subject to floating point errors:
[Number: 677253.527192] 8
Should work with random numbers between 0.0000001 and 9999999.9999999
Expected: '677253.52719199', instead got: '677253.52719200'
Thanks, Chrono. Turns out there was an off-by-one error in my conditional check to see if n is greater than the string length. No trailing space, but a null character (char code 0) was being appended to the word "is" because I was uppercasing a non-existent character at that index (n=3).
Can't figure out what's going on in the PHP translation:
Passed: 14 Failed: 1 Exit Code: 1
Should capitalise the third letter of the string
Failed asserting that two strings are identical.
Expected: whAt is yoUr naMe
Actual : whAt is yoUr naMe
How are 3 random tests not enough? What kind of solution would show the difference between 3 and 100 random tests and how many times would it have to be resubmitted to pass?
There are only 3 random tests per run (which is not enough, should be something like 100), and the test are making the old "duplicate test case generation code n times instead of putting it in a loop" mistake again.
There is no instruction for what to do when
offset >= depth
.Also no example and sample test for the above case
Unnecessary logs should be replaced with assertion messages and
it
blocksC# Translation ready for review. Author is no longer active, so I hope to find some power users ;-)
tests should be updated to node 12
not enough random tests
errors should be included in the random scenarii
the ref solution is incorrect, because subject to floating point errors:
Thanks, Chrono. Turns out there was an off-by-one error in my conditional check to see if n is greater than the string length. No trailing space, but a null character (char code 0) was being appended to the word "is" because I was uppercasing a non-existent character at that index (n=3).
Maybe some trailing space? I've just solved it in PHP and haven't found that problem. You could try posting your code here following these directions: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#post-discourse
Can't figure out what's going on in the PHP translation:
Done.
The same thing as when
offset < depth
. The wave is infinite and periodic, it doesn't make any difference.There is no instruction for what to do when
offset >= depth
.Test feedback could be much better if something like this is done:
Well, the point is it might. There are only 12 solutions around and they don't really say much.
How are 3 random tests not enough? What kind of solution would show the difference between 3 and 100 random tests and how many times would it have to be resubmitted to pass?
There are only 3 random tests per run (which is not enough, should be something like 100), and the test are making the old "duplicate test case generation code n times instead of putting it in a loop" mistake again.
The tests does not check if the thing thrown is actually according to the descriptions.
Loading more items...