Beispiel #1
0
 @Test
 public void testSolveNQueens3() {
   ArrayList<String[]> result = s.solveNQueens(4);
   for (String[] sa : result) {
     System.out.println(Arrays.asList(sa));
   }
   assertNotNull(result);
   assertTrue(result.size() == 2);
 }
Beispiel #2
0
 @Test
 public void testSolveNQueens4() {
   ArrayList<String[]> result = s.solveNQueens(9);
   for (String[] sa : result) {
     System.out.println(Arrays.asList(sa));
   }
   assertNotNull(result);
   assertTrue("number of distinct solutions " + result.size(), result.size() == 352);
 }
Beispiel #3
0
 @Test
 public void testSolveNQueens1() {
   ArrayList<String[]> result = s.solveNQueens(0);
   assertNotNull(result);
   assertTrue(result.size() == 0);
 }