示例#1
0
 @Test
 public void testArrayslice() {
   int[] a = {1, 4, 5, 8, 13, 35, 64, 72};
   int[] expResult = {64, 72};
   int[] result = Ex03.arrayslice(a, 6, 2);
   assertArrayEquals(expResult, result);
 }
示例#2
0
 @Test
 public void testSortedMergeWithDifferentLengths() {
   int[] a = {1, 4, 5, 8, 13, 35, 64, 72, 76};
   int[] b = {2, 6, 13, 18, 33, 45, 76, 88};
   int[] expResult = {1, 2, 4, 5, 6, 8, 13, 18, 33, 35, 45, 64, 72, 76, 88};
   int[] result = Ex03.sortedMerge(a, b);
   assertArrayEquals(expResult, result);
 }
示例#3
0
 @Test
 public void testShortSortedMerge() {
   int[] a = {1, 4, 5, 8};
   int[] b = {2, 6, 13, 18};
   int[] expResult = {1, 2, 4, 5, 6, 8, 13, 18};
   int[] result = Ex03.sortedMerge(a, b);
   assertArrayEquals(expResult, result);
 }