public static void main(String[] args) {
   AutoTestUtils.runTestClassAndPrint(MajorityNumberKPercentile.class);
 }
예제 #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);
 }
예제 #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);
 }
예제 #5
0
 @Test
 public void test5() {
   // random number 1
   for (Method m : AutoTestUtils.findMethod(methodName, c))
     assertTrue(invokeMethod(m, 47, 1, 4) == 61);
 }
예제 #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));
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }