@Test public void randomTest() { long timecost1 = 0, timecost2 = 0; for (int i = 5; i < 1000; i += 50) { List<Integer>[] graph = GraphBuilder.buildEulerCycle(i); for (List<Integer> j : graph) { Collections.sort(j); } long st = System.nanoTime(); List<Integer> expect = fleury(graph); timecost1 += System.nanoTime() - st; st = System.nanoTime(); List<Integer> test = EulerCycle.solveUndirectGraph(graph); timecost2 += System.nanoTime() - st; Assert.assertEquals(expect, test); } Assert.assertTrue(timecost1 + "," + timecost2, timecost1 > 90 * timecost2); }
public static List<Integer> solveUndirectGraph(List<Integer>[] graph) { return null; }
EulerCycle { public static List<Integer> solveUndirectGraph(List<Integer>[] graph) { return null; } }
EulerCycle { public static List<Integer> solveUndirectGraph(List<Integer>[] graph) { return null; }  }
EulerCycle { public static List<Integer> solveUndirectGraph(List<Integer>[] graph) { return null; }  static List<Integer> solveUndirectGraph(List<Integer>[] graph); }
EulerCycle { public static List<Integer> solveUndirectGraph(List<Integer>[] graph) { return null; }  static List<Integer> solveUndirectGraph(List<Integer>[] graph);  }