(String[] args)
| 110 | |
| 111 | |
| 112 | public static void main(String[] args) { |
| 113 | int numberOfTests = 1000; |
| 114 | int count = 0; |
| 115 | while (count < numberOfTests) { |
| 116 | int[] array = AssortedMethods.randomArray(10, -1000, 1000); |
| 117 | if (isUnique(array)) { |
| 118 | int n = AssortedMethods.randomIntInRange(0, array.length - 1); |
| 119 | int rank1 = rank(array.clone(), 0, array.length - 1, n); |
| 120 | int rank2 = rankB(array.clone(), n); |
| 121 | |
| 122 | if (rank1 != rank2) { |
| 123 | System.out.println("ERROR: " + rank1 + " " + rank2); |
| 124 | AssortedMethods.printIntArray(array); |
| 125 | } |
| 126 | count++; |
| 127 | } |
| 128 | } |
| 129 | System.out.println("Completed " + count + " runs."); |
| 130 | } |
| 131 | |
| 132 | } |
nothing calls this directly
no test coverage detected