I agree that the {"NORTH","WEST","SOUTH","EAST"} case should just return an empty array. The problem I think, is that the theme (I guess?) of the kata doesn't quite match the actual logical problem it's asking. Hopefully that makes sense...
It might help, but notice that your soltion still crashes in one of ~five runs. Apparently, mutating the array only emphasized some other bug sitting somewhere there.
Is it a good practice to have 0 or negative delta value in test cases while comparing floats or doubles?
Fixed. Had an error in the random test generation, that's why there were no tests for the last column but the others could overflow.
m'kay, something got mixed up... let me check
Need to correct the typo in Java sameple test case
@TestMethodOrder(MethodOrderer.O[e]rderAnnotation.class)
The description should be updated to highlight column overflow scenario
The random test cases seem to not generate input values for the last column (6th one)
Terminology correction needed - Visa, Mastercard, AMEX are not card issuers - your bank is a card issuer. Mastercard, Visa, etc are card networks.
Good kata to try concurrency based solution.
What is a use of the first argument, int n? Its not needed, i believe.
Quite similar to Top N closest points
The user appears to have solved the kata, there don't appear to be any issues with the tests in Java.
I agree that the
{"NORTH","WEST","SOUTH","EAST"}
case should just return an empty array. The problem I think, is that the theme (I guess?) of the kata doesn't quite match the actual logical problem it's asking. Hopefully that makes sense...For Java, in your testcases, you may want to use
assertArrayEquals
instead ofassertEquals
got retired
Could do with more random tests
It might help, but notice that your soltion still crashes in one of ~five runs. Apparently, mutating the array only emphasized some other bug sitting somewhere there.
Thank you, Making a copy of
arr
did the trick.Loading more items...