why does sorting error occur? Or should this kata be solved without using sorting?
@Test public void testClosestLess() { int[][] points = {{1,2}}; int[][] results = ClosestPoints.getTopN(points,3); assertEquals(results.length, 1); }
The expected:<3> but was:<1> error message is not informative at all.
expected:<3> but was:<1>
How should cases where the amount of points wanted is more than the given? Just giving empty coords ({0,0}) doesn't work and this is not indicated in the description.
has now 300 random tests. ;p
Has now one random test case.
Has no random test cases
FYI - Initial description first param name is missing
Loading collection data...
why does sorting error occur?
Or should this kata be solved without using sorting?
The
expected:<3> but was:<1>
error message is not informative at all.How should cases where the amount of points wanted is more than the given? Just giving empty coords ({0,0}) doesn't work and this is not indicated in the description.
has now 300 random tests. ;p
Has now one random test case.
Has no random test cases
FYI - Initial description first param name is missing