public static void main(String[] args) {
   AutoTestUtils.runTestClassAndPrint(MajorityNumberKPercentile.class);
 }
Exemplo n.º 2
0
 @Test
 public void test6() {
   // random number 2
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, 28, 0, 2) == 25);
 }
 public static void main(String[] args) {
   AutoTestUtils.runTestClassAndPrint(Minimum_Size_Subarray_Sum.class);
 }
Exemplo n.º 4
0
 @Test
 public void test4() {
   long x = 8; // swap 0 and 1
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, x, 0, 3) == 1);
 }
Exemplo n.º 5
0
 @Test
 public void test5() {
   // random number 1
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, 47, 1, 4) == 61);
 }
Exemplo n.º 6
0
 @Test
 public void test3() {
   long x = 1; // swap 1 and 0
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, x, 0, 64) == (1 << 64));
 }
Exemplo n.º 7
0
 @Test
 public void test2() {
   long x = 0; // no differs, all 0
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, x, 0, 64) == 0);
 }
Exemplo n.º 8
0
 @Test
 public void test1() {
   long x = 9; // no differs, all 1
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, x, 0, 3) == 9);
 }
Exemplo n.º 9
0
 public static void main(String[] args) {
   AutoTestUtils.runTestClassAndPrint(Q2_Swap_Bits.class);
 }
 public static void main(String[] args) {
   AutoTestUtils.runTestClassAndPrint(Kth_Largest_Element_in_an_Array.class);
 }