MCPcopy Index your code
hub / github.com/hustcc/JS-Sorting-Algorithm / setUp

Method setUp

src/java/test/ArraySortTest.java:22–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 private int[] positiveArraySorted;
21
22 @Before
23 public void setUp() throws Exception {
24 // 生成随机数组
25 array = randomArray(-1000, 1000, 100);
26 // 使用 Arrays.sort() 排序作为对比
27 sortedArray = Arrays.copyOf(array, array.length);
28 Arrays.sort(sortedArray);
29
30 positiveArray = randomArray(0, 1000, 100);
31 positiveArraySorted = Arrays.copyOf(positiveArray, positiveArray.length);
32 Arrays.sort(positiveArraySorted);
33 }
34
35 /**
36 * 随机指定范围内N个不重复的数

Callers

nothing calls this directly

Calls 2

randomArrayMethod · 0.95
sortMethod · 0.65

Tested by

no test coverage detected