void (final int[][] src, final int[][] expected) { final int[] cells = new int[src.length]; final int[] spans = new int[src.length]; for (int i = 0; i < cells.length; i++) { cells[i] = src[i][0]; spans[i] = src[i][1]; } Util.eliminate(cells, spans, null); for (int i = 0; i < spans.length; i++) { if (cells[i] != expected[i][0] || spans[i] != expected[i][1] ){ for (int j = 0; j < spans.length; j++) { System.out.println("i=" + j + " expected ("+expected[j][0] + "," + expected[j][1] +"), result (" + cells[j] + "," + spans[j]+")"); } fail(); } } }