TestSort.java
Select all
/* TestSort.java David G. Klick CIS 260 2010-01-21 Test program for Sort class. */ public class TestSort { public static void main(String[] args) { final int ARRAY_SIZE = 50000; final int MAX_PASSES = 10000; final int UPDATE = 100; final long RANGE = (long) Integer.MAX_VALUE - Integer.MIN_VALUE + 1; Integer[] work = new Integer[ARRAY_SIZE]; int success = 0; System.out.println("Testing sort " + MAX_PASSES + " times."); for (int pass=1; pass<=MAX_PASSES; pass++) { for (int i=0; i
0) return false; } return true; } }