/libcore/jsr166-tests/src/test/java/jsr166/ |
D | PriorityQueueTest.java | 59 assertEquals(0, new PriorityQueue(SIZE).size()); in testConstructor1() 87 new PriorityQueue(Arrays.asList(new Integer[SIZE])); in testConstructor4() 96 Integer[] ints = new Integer[SIZE]; in testConstructor5() 97 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 109 Integer[] ints = new Integer[SIZE]; in testConstructor6() 110 for (int i = 0; i < SIZE; ++i) in testConstructor6() 113 for (int i = 0; i < SIZE; ++i) in testConstructor6() 122 PriorityQueue q = new PriorityQueue(SIZE, cmp); in testConstructor7() 124 Integer[] ints = new Integer[SIZE]; in testConstructor7() 125 for (int i = 0; i < SIZE; ++i) in testConstructor7() [all …]
|
D | ArrayBlockingQueueTest.java | 75 assertEquals(SIZE, new ArrayBlockingQueue(SIZE).remainingCapacity()); in testConstructor1() 102 Collection<Integer> elements = Arrays.asList(new Integer[SIZE]); in testConstructor4() 104 new ArrayBlockingQueue(SIZE, false, elements); in testConstructor4() 113 Integer[] ints = new Integer[SIZE]; in testConstructor5() 114 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 118 new ArrayBlockingQueue(SIZE, false, elements); in testConstructor5() 127 Integer[] ints = new Integer[SIZE]; in testConstructor6() 128 for (int i = 0; i < SIZE; ++i) in testConstructor6() 132 new ArrayBlockingQueue(SIZE - 1, false, elements); in testConstructor6() 141 Integer[] ints = new Integer[SIZE]; in testConstructor7() [all …]
|
D | PriorityBlockingQueueTest.java | 87 new PriorityBlockingQueue(SIZE).remainingCapacity()); in testConstructor1() 114 Collection<Integer> elements = Arrays.asList(new Integer[SIZE]); in testConstructor4() 125 Integer[] ints = new Integer[SIZE]; in testConstructor5() 126 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 139 Integer[] ints = new Integer[SIZE]; in testConstructor6() 140 for (int i = 0; i < SIZE; ++i) in testConstructor6() 143 for (int i = 0; i < SIZE; ++i) in testConstructor6() 152 PriorityBlockingQueue q = new PriorityBlockingQueue(SIZE, cmp); in testConstructor7() 154 Integer[] ints = new Integer[SIZE]; in testConstructor7() 155 for (int i = 0; i < SIZE; ++i) in testConstructor7() [all …]
|
D | LinkedBlockingQueueTest.java | 77 assertEquals(SIZE, new LinkedBlockingQueue(SIZE).remainingCapacity()); in testConstructor1() 105 Collection<Integer> elements = Arrays.asList(new Integer[SIZE]); in testConstructor4() 117 Integer[] ints = new Integer[SIZE]; in testConstructor5() 118 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 131 Integer[] ints = new Integer[SIZE]; in testConstructor6() 132 for (int i = 0; i < SIZE; ++i) in testConstructor6() 135 for (int i = 0; i < SIZE; ++i) in testConstructor6() 158 BlockingQueue q = populatedQueue(SIZE); in testRemainingCapacity() 159 for (int i = 0; i < SIZE; ++i) { in testRemainingCapacity() 161 assertEquals(SIZE, q.size() + q.remainingCapacity()); in testRemainingCapacity() [all …]
|
D | LinkedListTest.java | 66 Integer[] ints = new Integer[SIZE]; in testConstructor6() 67 for (int i = 0; i < SIZE; ++i) in testConstructor6() 70 for (int i = 0; i < SIZE; ++i) in testConstructor6() 92 LinkedList q = populatedQueue(SIZE); in testSize() 93 for (int i = 0; i < SIZE; ++i) { in testSize() 94 assertEquals(SIZE - i, q.size()); in testSize() 97 for (int i = 0; i < SIZE; ++i) { in testSize() 127 for (int i = 0; i < SIZE; ++i) { in testAdd() 149 Integer[] ints = new Integer[SIZE]; in testAddAll5() 150 for (int i = 0; i < SIZE; ++i) in testAddAll5() [all …]
|
D | ConcurrentLinkedQueueTest.java | 69 new ConcurrentLinkedQueue(Arrays.asList(new Integer[SIZE])); in testConstructor4() 78 Integer[] ints = new Integer[SIZE]; in testConstructor5() 79 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 91 Integer[] ints = new Integer[SIZE]; in testConstructor6() 92 for (int i = 0; i < SIZE; ++i) in testConstructor6() 95 for (int i = 0; i < SIZE; ++i) in testConstructor6() 117 ConcurrentLinkedQueue q = populatedQueue(SIZE); in testSize() 118 for (int i = 0; i < SIZE; ++i) { in testSize() 119 assertEquals(SIZE - i, q.size()); in testSize() 122 for (int i = 0; i < SIZE; ++i) { in testSize() [all …]
|
D | LinkedBlockingDequeTest.java | 37 return new LinkedBlockingDeque(SIZE); in emptyCollection() 87 LinkedBlockingDeque q = populatedDeque(SIZE); in testSize() 88 for (int i = 0; i < SIZE; ++i) { in testSize() 89 assertEquals(SIZE - i, q.size()); in testSize() 92 for (int i = 0; i < SIZE; ++i) { in testSize() 142 LinkedBlockingDeque q = populatedDeque(SIZE); in testPollFirst() 143 for (int i = 0; i < SIZE; ++i) { in testPollFirst() 153 LinkedBlockingDeque q = populatedDeque(SIZE); in testPollLast() 154 for (int i = SIZE - 1; i >= 0; --i) { in testPollLast() 164 LinkedBlockingDeque q = populatedDeque(SIZE); in testPeekFirst() [all …]
|
D | DelayQueueTest.java | 174 new DelayQueue(Arrays.asList(new PDelay[SIZE])); in testConstructor4() 183 PDelay[] a = new PDelay[SIZE]; in testConstructor5() 184 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 196 PDelay[] ints = new PDelay[SIZE]; in testConstructor6() 197 for (int i = 0; i < SIZE; ++i) in testConstructor6() 200 for (int i = 0; i < SIZE; ++i) in testConstructor6() 223 BlockingQueue q = populatedQueue(SIZE); in testRemainingCapacity() 224 for (int i = 0; i < SIZE; ++i) { in testRemainingCapacity() 226 assertEquals(SIZE - i, q.size()); in testRemainingCapacity() 229 for (int i = 0; i < SIZE; ++i) { in testRemainingCapacity() [all …]
|
D | ConcurrentLinkedDequeTest.java | 72 new ConcurrentLinkedDeque(Arrays.asList(new Integer[SIZE])); in testConstructor4() 81 Integer[] ints = new Integer[SIZE]; in testConstructor5() 82 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 94 Integer[] ints = new Integer[SIZE]; in testConstructor6() 95 for (int i = 0; i < SIZE; ++i) in testConstructor6() 98 for (int i = 0; i < SIZE; ++i) in testConstructor6() 120 ConcurrentLinkedDeque q = populatedDeque(SIZE); in testSize() 121 for (int i = 0; i < SIZE; ++i) { in testSize() 122 assertEquals(SIZE - i, q.size()); in testSize() 125 for (int i = 0; i < SIZE; ++i) { in testSize() [all …]
|
D | ArrayDequeTest.java | 68 new ArrayDeque(Arrays.asList(new Integer[SIZE])); in testConstructor4() 77 Integer[] ints = new Integer[SIZE]; in testConstructor5() 78 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 90 Integer[] ints = new Integer[SIZE]; in testConstructor6() 91 for (int i = 0; i < SIZE; ++i) in testConstructor6() 94 for (int i = 0; i < SIZE; ++i) in testConstructor6() 116 ArrayDeque q = populatedDeque(SIZE); in testSize() 117 for (int i = 0; i < SIZE; ++i) { in testSize() 118 assertEquals(SIZE - i, q.size()); in testSize() 121 for (int i = 0; i < SIZE; ++i) { in testSize() [all …]
|
D | AtomicIntegerArrayTest.java | 33 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testConstructor() 34 for (int i = 0; i < SIZE; i++) in testConstructor() 64 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testIndexing() 65 for (int index : new int[] { -1, SIZE }) { in testIndexing() 101 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testGetSet() 102 for (int i = 0; i < SIZE; i++) { in testGetSet() 116 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testGetLazySet() 117 for (int i = 0; i < SIZE; i++) { in testGetLazySet() 131 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testCompareAndSet() 132 for (int i = 0; i < SIZE; i++) { in testCompareAndSet() [all …]
|
D | AtomicLongArrayTest.java | 32 AtomicLongArray aa = new AtomicLongArray(SIZE); in testConstructor() 33 for (int i = 0; i < SIZE; i++) in testConstructor() 63 AtomicLongArray aa = new AtomicLongArray(SIZE); in testIndexing() 64 for (int index : new int[] { -1, SIZE }) { in testIndexing() 100 AtomicLongArray aa = new AtomicLongArray(SIZE); in testGetSet() 101 for (int i = 0; i < SIZE; i++) { in testGetSet() 115 AtomicLongArray aa = new AtomicLongArray(SIZE); in testGetLazySet() 116 for (int i = 0; i < SIZE; i++) { in testGetLazySet() 130 AtomicLongArray aa = new AtomicLongArray(SIZE); in testCompareAndSet() 131 for (int i = 0; i < SIZE; i++) { in testCompareAndSet() [all …]
|
D | ConcurrentHashMap8Test.java | 563 static final int SIZE = 10000; field in ConcurrentHashMap8Test 568 longMap = new ConcurrentHashMap<Long, Long>(SIZE); in longMap() 569 for (int i = 0; i < SIZE; ++i) in longMap() 591 assertEquals(adder.sum(), SIZE * (SIZE - 1) / 2); in testForEachKeySequentially() 601 assertEquals(adder.sum(), SIZE * (SIZE - 1)); in testForEachValueSequentially() 611 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachSequentially() 621 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachEntrySequentially() 631 assertEquals(adder.sum(), SIZE * (SIZE - 1) / 2); in testForEachKeyInParallel() 641 assertEquals(adder.sum(), SIZE * (SIZE - 1)); in testForEachValueInParallel() 651 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachInParallel() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | PriorityQueueTest.java | 96 assertEquals(0, new PriorityQueue(SIZE).size()); in testConstructor1() 124 new PriorityQueue(Arrays.asList(new Integer[SIZE])); in testConstructor4() 133 Integer[] ints = new Integer[SIZE]; in testConstructor5() 134 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 146 Integer[] ints = new Integer[SIZE]; in testConstructor6() 147 for (int i = 0; i < SIZE; ++i) in testConstructor6() 150 for (int i = 0; i < SIZE; ++i) in testConstructor6() 159 PriorityQueue q = new PriorityQueue(SIZE, cmp); in testConstructor7() 161 Integer[] ints = new Integer[SIZE]; in testConstructor7() 162 for (int i = 0; i < SIZE; ++i) in testConstructor7() [all …]
|
D | PriorityBlockingQueueTest.java | 64 return new PriorityBlockingQueue(SIZE); in emptyCollection() 117 new PriorityBlockingQueue(SIZE).remainingCapacity()); in testConstructor1() 144 Collection<Integer> elements = Arrays.asList(new Integer[SIZE]); in testConstructor4() 155 Integer[] ints = new Integer[SIZE]; in testConstructor5() 156 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 169 Integer[] ints = new Integer[SIZE]; in testConstructor6() 170 for (int i = 0; i < SIZE; ++i) in testConstructor6() 173 for (int i = 0; i < SIZE; ++i) in testConstructor6() 182 PriorityBlockingQueue q = new PriorityBlockingQueue(SIZE, cmp); in testConstructor7() 184 Integer[] ints = new Integer[SIZE]; in testConstructor7() [all …]
|
D | LinkedBlockingQueueTest.java | 63 return new LinkedBlockingQueue(SIZE); in emptyCollection() 107 assertEquals(SIZE, new LinkedBlockingQueue(SIZE).remainingCapacity()); in testConstructor1() 135 Collection<Integer> elements = Arrays.asList(new Integer[SIZE]); in testConstructor4() 147 Integer[] ints = new Integer[SIZE]; in testConstructor5() 148 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 161 Integer[] ints = new Integer[SIZE]; in testConstructor6() 162 for (int i = 0; i < SIZE; ++i) in testConstructor6() 165 for (int i = 0; i < SIZE; ++i) in testConstructor6() 188 BlockingQueue q = populatedQueue(SIZE); in testRemainingCapacity() 189 for (int i = 0; i < SIZE; ++i) { in testRemainingCapacity() [all …]
|
D | LinkedListTest.java | 107 Integer[] ints = new Integer[SIZE]; in testConstructor6() 108 for (int i = 0; i < SIZE; ++i) in testConstructor6() 111 for (int i = 0; i < SIZE; ++i) in testConstructor6() 133 LinkedList q = populatedQueue(SIZE); in testSize() 134 for (int i = 0; i < SIZE; ++i) { in testSize() 135 assertEquals(SIZE - i, q.size()); in testSize() 138 for (int i = 0; i < SIZE; ++i) { in testSize() 168 for (int i = 0; i < SIZE; ++i) { in testAdd() 190 Integer[] ints = new Integer[SIZE]; in testAddAll5() 191 for (int i = 0; i < SIZE; ++i) in testAddAll5() [all …]
|
D | ConcurrentLinkedQueueTest.java | 102 new ConcurrentLinkedQueue(Arrays.asList(new Integer[SIZE])); in testConstructor4() 111 Integer[] ints = new Integer[SIZE]; in testConstructor5() 112 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 124 Integer[] ints = new Integer[SIZE]; in testConstructor6() 125 for (int i = 0; i < SIZE; ++i) in testConstructor6() 128 for (int i = 0; i < SIZE; ++i) in testConstructor6() 150 ConcurrentLinkedQueue q = populatedQueue(SIZE); in testSize() 151 for (int i = 0; i < SIZE; ++i) { in testSize() 152 assertEquals(SIZE - i, q.size()); in testSize() 155 for (int i = 0; i < SIZE; ++i) { in testSize() [all …]
|
D | LinkedBlockingDequeTest.java | 63 return new LinkedBlockingDeque(SIZE); in emptyCollection() 121 LinkedBlockingDeque q = populatedDeque(SIZE); in testSize() 122 for (int i = 0; i < SIZE; ++i) { in testSize() 123 assertEquals(SIZE - i, q.size()); in testSize() 126 for (int i = 0; i < SIZE; ++i) { in testSize() 176 LinkedBlockingDeque q = populatedDeque(SIZE); in testPollFirst() 177 for (int i = 0; i < SIZE; ++i) { in testPollFirst() 187 LinkedBlockingDeque q = populatedDeque(SIZE); in testPollLast() 188 for (int i = SIZE - 1; i >= 0; --i) { in testPollLast() 198 LinkedBlockingDeque q = populatedDeque(SIZE); in testPeekFirst() [all …]
|
D | DelayQueueTest.java | 182 new DelayQueue(Arrays.asList(new PDelay[SIZE])); in testConstructor4() 191 PDelay[] a = new PDelay[SIZE]; in testConstructor5() 192 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 204 PDelay[] ints = new PDelay[SIZE]; in testConstructor6() 205 for (int i = 0; i < SIZE; ++i) in testConstructor6() 208 for (int i = 0; i < SIZE; ++i) in testConstructor6() 231 BlockingQueue q = populatedQueue(SIZE); in testRemainingCapacity() 232 for (int i = 0; i < SIZE; ++i) { in testRemainingCapacity() 234 assertEquals(SIZE - i, q.size()); in testRemainingCapacity() 237 for (int i = 0; i < SIZE; ++i) { in testRemainingCapacity() [all …]
|
D | ConcurrentLinkedDequeTest.java | 106 new ConcurrentLinkedDeque(Arrays.asList(new Integer[SIZE])); in testConstructor4() 115 Integer[] ints = new Integer[SIZE]; in testConstructor5() 116 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 128 Integer[] ints = new Integer[SIZE]; in testConstructor6() 129 for (int i = 0; i < SIZE; ++i) in testConstructor6() 132 for (int i = 0; i < SIZE; ++i) in testConstructor6() 154 ConcurrentLinkedDeque q = populatedDeque(SIZE); in testSize() 155 for (int i = 0; i < SIZE; ++i) { in testSize() 156 assertEquals(SIZE - i, q.size()); in testSize() 159 for (int i = 0; i < SIZE; ++i) { in testSize() [all …]
|
D | ArrayBlockingQueueTest.java | 66 return populatedQueue(0, SIZE, 2 * SIZE, fair); in suite() 82 return populatedQueue(0, SIZE, 2 * SIZE, true); in emptyCollection() 88 return populatedQueue(0, SIZE, 2 * SIZE, false); in emptyCollection() 130 assertEquals(SIZE, new ArrayBlockingQueue(SIZE).remainingCapacity()); in testConstructor1() 165 Collection<Integer> elements = Arrays.asList(new Integer[SIZE]); in testConstructor4() 167 new ArrayBlockingQueue(SIZE, false, elements); in testConstructor4() 176 Integer[] ints = new Integer[SIZE]; in testConstructor5() 177 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5() 181 new ArrayBlockingQueue(SIZE, false, elements); in testConstructor5() 191 new ArrayBlockingQueue(SIZE, false, in testConstructor_collectionTooLarge() [all …]
|
D | AtomicLongArrayTest.java | 55 AtomicLongArray aa = new AtomicLongArray(SIZE); in testConstructor() 56 for (int i = 0; i < SIZE; i++) in testConstructor() 86 AtomicLongArray aa = new AtomicLongArray(SIZE); in testIndexing() 87 for (int index : new int[] { -1, SIZE }) { in testIndexing() 123 AtomicLongArray aa = new AtomicLongArray(SIZE); in testGetSet() 124 for (int i = 0; i < SIZE; i++) { in testGetSet() 138 AtomicLongArray aa = new AtomicLongArray(SIZE); in testGetLazySet() 139 for (int i = 0; i < SIZE; i++) { in testGetLazySet() 153 AtomicLongArray aa = new AtomicLongArray(SIZE); in testCompareAndSet() 154 for (int i = 0; i < SIZE; i++) { in testCompareAndSet() [all …]
|
D | AtomicIntegerArrayTest.java | 56 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testConstructor() 57 for (int i = 0; i < SIZE; i++) in testConstructor() 87 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testIndexing() 88 for (int index : new int[] { -1, SIZE }) { in testIndexing() 124 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testGetSet() 125 for (int i = 0; i < SIZE; i++) { in testGetSet() 139 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testGetLazySet() 140 for (int i = 0; i < SIZE; i++) { in testGetLazySet() 154 AtomicIntegerArray aa = new AtomicIntegerArray(SIZE); in testCompareAndSet() 155 for (int i = 0; i < SIZE; i++) { in testCompareAndSet() [all …]
|
D | ConcurrentHashMap8Test.java | 588 static final int SIZE = 10000; field in ConcurrentHashMap8Test 593 longMap = new ConcurrentHashMap<Long, Long>(SIZE); in longMap() 594 for (int i = 0; i < SIZE; ++i) in longMap() 616 assertEquals(adder.sum(), SIZE * (SIZE - 1) / 2); in testForEachKeySequentially() 626 assertEquals(adder.sum(), SIZE * (SIZE - 1)); in testForEachValueSequentially() 636 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachSequentially() 646 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachEntrySequentially() 656 assertEquals(adder.sum(), SIZE * (SIZE - 1) / 2); in testForEachKeyInParallel() 666 assertEquals(adder.sum(), SIZE * (SIZE - 1)); in testForEachValueInParallel() 676 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachInParallel() [all …]
|