/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | StreamCloseTest.java | 42 try (Stream<Integer> ints = countTo(100).stream()) { in testEmptyCloseHandler() argument 43 ints.forEach(i -> {}); in testEmptyCloseHandler() 51 try (Stream<Integer> ints = countTo(100).stream()) { in testOneCloseHandler() argument 52 ints.onClose(closer); in testOneCloseHandler() 53 ints.forEach(i -> {}); in testOneCloseHandler() 58 try (Stream<Integer> ints = countTo(100).stream().onClose(closer)) { in testOneCloseHandler() argument 59 ints.forEach(i -> {}); in testOneCloseHandler() 64 try (Stream<Integer> ints = countTo(100).stream().filter(e -> true).onClose(closer)) { in testOneCloseHandler() argument 65 ints.forEach(i -> {}); in testOneCloseHandler() 70 …try (Stream<Integer> ints = countTo(100).stream().filter(e -> true).onClose(closer).filter(e -> tr… in testOneCloseHandler() argument [all …]
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | IntStreamTestDataProvider.java | 84 final int[] ints = (int[]) data[1]; 87 name, TestData.Factory.ofArray("array:" + name, ints)}); in list.add() argument 90 for (int i : ints) { 96 list.add(streamDataDescr("IntStream.intRange(0,l): " + ints.length, 97 () -> IntStream.range(0, ints.length))); 98 list.add(streamDataDescr("IntStream.rangeClosed(0,l): " + ints.length, 99 () -> IntStream.rangeClosed(0, ints.length))); 108 final int[] ints = (int[]) data[1]; 111 for (int i : ints) { 116 () -> Arrays.spliterator(ints))); [all …]
|
D | StreamTestDataProvider.java | 90 final Integer[] ints = (Integer[])data[1]; 91 final List<Integer> intsAsList = Arrays.asList(ints); 93 list.add(arrayDataDescr("array:" + name, ints)); 105 … (ints.length) <= 1 ? aList.subList(0, 0) : aList.subList(1, ints.length / 2))); 146 final Integer[] ints = (Integer[])data[1]; 149 () -> Arrays.spliterator(ints))); 151 () -> Arrays.spliterator(ints, 0, ints.length/2))); 155 for (Integer i : ints) 160 … () -> Spliterators.spliterator(Arrays.asList(ints).iterator(), ints.length, 0))); 162 … () -> Spliterators.spliteratorUnknownSize(Arrays.asList(ints).iterator(), 0)));
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | IntStreamTestDataProvider.java | 88 final int[] ints = (int[]) data[1]; 91 name, TestData.Factory.ofArray("array:" + name, ints)}); in list.add() argument 94 for (int i : ints) { 100 list.add(streamDataDescr("IntStream.intRange(0,l): " + ints.length, 101 () -> IntStream.range(0, ints.length))); 102 list.add(streamDataDescr("IntStream.rangeClosed(0,l): " + ints.length, 103 () -> IntStream.rangeClosed(0, ints.length))); 112 final int[] ints = (int[]) data[1]; 115 for (int i : ints) { 120 () -> Arrays.spliterator(ints))); [all …]
|
D | StreamTestDataProvider.java | 96 final Integer[] ints = (Integer[])data[1]; 97 final List<Integer> intsAsList = Arrays.asList(ints); 99 list.add(arrayDataDescr("array:" + name, ints)); 111 … (ints.length) <= 1 ? aList.subList(0, 0) : aList.subList(1, ints.length / 2))); 152 final Integer[] ints = (Integer[])data[1]; 155 () -> Arrays.spliterator(ints))); 157 () -> Arrays.spliterator(ints, 0, ints.length/2))); 161 for (Integer i : ints) 166 … () -> Spliterators.spliterator(Arrays.asList(ints).iterator(), ints.length, 0))); 168 … () -> Spliterators.spliteratorUnknownSize(Arrays.asList(ints).iterator(), 0)));
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ArrayTest.java | 28 private static int[] ints; field in ArrayTest 39 ints = new int[] { 0xffffffff }; in setUp() 50 try { Array.getBoolean(ints, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 62 try { Array.getByte(ints, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetByte() 74 try { Array.getChar(ints, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetChar() 86 assertEquals((double) ints[0], Array.getDouble(ints, 0)); in testGetDouble() 98 assertEquals((float) ints[0], Array.getFloat(ints, 0)); in testGetFloat() 110 assertEquals(ints[0], Array.getInt(ints, 0)); in testGetInt() 122 assertEquals((long) ints[0], Array.getLong(ints, 0)); in testGetLong() 134 try { Array.getShort(ints, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetShort() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | PriorityQueueTest.java | 96 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 98 ints[i] = new Integer(i); in testConstructor5() 100 new PriorityQueue(Arrays.asList(ints)); in testConstructor5() 109 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 111 ints[i] = new Integer(i); in testConstructor6() 112 PriorityQueue q = new PriorityQueue(Arrays.asList(ints)); in testConstructor6() 114 assertEquals(ints[i], q.poll()); in testConstructor6() 124 Integer[] ints = new Integer[SIZE]; in testConstructor7() local 126 ints[i] = new Integer(i); in testConstructor7() 127 q.addAll(Arrays.asList(ints)); in testConstructor7() [all …]
|
D | AbstractQueueTest.java | 147 Integer[] ints = new Integer[SIZE]; in testAddAll2() local 149 q.addAll(Arrays.asList(ints)); in testAddAll2() 160 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 162 ints[i] = new Integer(i); in testAddAll3() 164 q.addAll(Arrays.asList(ints)); in testAddAll3() 174 Integer[] ints = new Integer[SIZE]; in testAddAll4() local 176 ints[i] = new Integer(i); in testAddAll4() 178 q.addAll(Arrays.asList(ints)); in testAddAll4()
|
D | ConcurrentLinkedQueueTest.java | 78 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 80 ints[i] = new Integer(i); in testConstructor5() 82 new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor5() 91 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 93 ints[i] = new Integer(i); in testConstructor6() 94 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor6() 96 assertEquals(ints[i], q.poll()); in testConstructor6() 209 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 211 ints[i] = new Integer(i); in testAddAll3() 213 q.addAll(Arrays.asList(ints)); in testAddAll3() [all …]
|
D | PriorityBlockingQueueTest.java | 125 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 127 ints[i] = i; in testConstructor5() 128 Collection<Integer> elements = Arrays.asList(ints); in testConstructor5() 139 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 141 ints[i] = i; in testConstructor6() 142 PriorityBlockingQueue q = new PriorityBlockingQueue(Arrays.asList(ints)); in testConstructor6() 144 assertEquals(ints[i], q.poll()); in testConstructor6() 154 Integer[] ints = new Integer[SIZE]; in testConstructor7() local 156 ints[i] = new Integer(i); in testConstructor7() 157 q.addAll(Arrays.asList(ints)); in testConstructor7() [all …]
|
D | ThreadLocalRandom8Test.java | 45 () -> r.ints(-1L), in testBadStreamSize() 46 () -> r.ints(-1L, 2, 3), in testBadStreamSize() 62 () -> r.ints(2, 1), in testBadStreamBounds() 63 () -> r.ints(10, 42, 42), in testBadStreamBounds() 81 r.ints(size).parallel().forEach(x -> counter.increment()); in testIntsCount() 127 r.ints(size, lo, hi).parallel().forEach( in testBoundedInts() 181 r.ints().limit(size).parallel().forEach(x -> counter.increment()); in testUnsizedIntsCount() 214 r.ints().limit(size).forEach(x -> counter.increment()); in testUnsizedIntsCountSeq()
|
D | LinkedBlockingQueueTest.java | 117 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 119 ints[i] = new Integer(i); in testConstructor5() 120 Collection<Integer> elements = Arrays.asList(ints); in testConstructor5() 131 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 133 ints[i] = new Integer(i); in testConstructor6() 134 LinkedBlockingQueue q = new LinkedBlockingQueue(Arrays.asList(ints)); in testConstructor6() 136 assertEquals(ints[i], q.poll()); in testConstructor6() 211 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 213 ints[i] = new Integer(i); in testAddAll3() 214 Collection<Integer> elements = Arrays.asList(ints); in testAddAll3() [all …]
|
D | TreeSetTest.java | 108 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 110 ints[i] = new Integer(i); in testConstructor5() 112 new TreeSet(Arrays.asList(ints)); in testConstructor5() 121 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 123 ints[i] = new Integer(i); in testConstructor6() 124 TreeSet q = new TreeSet(Arrays.asList(ints)); in testConstructor6() 126 assertEquals(ints[i], q.pollFirst()); in testConstructor6() 136 Integer[] ints = new Integer[SIZE]; in testConstructor7() local 138 ints[i] = new Integer(i); in testConstructor7() 139 q.addAll(Arrays.asList(ints)); in testConstructor7() [all …]
|
D | TreeSubSetTest.java | 192 Integer[] ints = new Integer[SIZE]; in testAddAll2() local 194 q.addAll(Arrays.asList(ints)); in testAddAll2() 205 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 207 ints[i] = new Integer(i + SIZE); in testAddAll3() 209 q.addAll(Arrays.asList(ints)); in testAddAll3() 219 Integer[] ints = new Integer[SIZE]; in testAddAll5() local 221 ints[i] = new Integer(SIZE - 1 - i); in testAddAll5() 224 assertTrue(q.addAll(Arrays.asList(ints))); in testAddAll5() 423 Integer[] ints = new Integer[SIZE]; in testToArray2() local 424 Integer[] array = q.toArray(ints); in testToArray2() [all …]
|
D | ConcurrentSkipListSubSetTest.java | 195 Integer[] ints = new Integer[SIZE]; in testAddAll2() local 197 q.addAll(Arrays.asList(ints)); in testAddAll2() 208 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 210 ints[i] = new Integer(i + SIZE); in testAddAll3() 212 q.addAll(Arrays.asList(ints)); in testAddAll3() 222 Integer[] ints = new Integer[SIZE]; in testAddAll5() local 224 ints[i] = new Integer(SIZE - 1 - i); in testAddAll5() 227 assertTrue(q.addAll(Arrays.asList(ints))); in testAddAll5() 426 Integer[] ints = new Integer[SIZE]; in testToArray2() local 427 Integer[] array = q.toArray(ints); in testToArray2() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | AbstractQueueTest.java | 170 Integer[] ints = new Integer[SIZE]; in testAddAll2() local 172 q.addAll(Arrays.asList(ints)); in testAddAll2() 183 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 185 ints[i] = new Integer(i); in testAddAll3() 187 q.addAll(Arrays.asList(ints)); in testAddAll3() 197 Integer[] ints = new Integer[SIZE]; in testAddAll4() local 199 ints[i] = new Integer(i); in testAddAll4() 201 q.addAll(Arrays.asList(ints)); in testAddAll4()
|
D | PriorityQueueTest.java | 128 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 130 ints[i] = new Integer(i); in testConstructor5() 132 new PriorityQueue(Arrays.asList(ints)); in testConstructor5() 141 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 143 ints[i] = new Integer(i); in testConstructor6() 144 PriorityQueue q = new PriorityQueue(Arrays.asList(ints)); in testConstructor6() 146 assertEquals(ints[i], q.poll()); in testConstructor6() 156 Integer[] ints = new Integer[SIZE]; in testConstructor7() local 158 ints[i] = new Integer(i); in testConstructor7() 159 q.addAll(Arrays.asList(ints)); in testConstructor7() [all …]
|
D | ConcurrentLinkedQueueTest.java | 111 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 113 ints[i] = new Integer(i); in testConstructor5() 115 new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor5() 124 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 126 ints[i] = new Integer(i); in testConstructor6() 127 ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor6() 129 assertEquals(ints[i], q.poll()); in testConstructor6() 242 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 244 ints[i] = new Integer(i); in testAddAll3() 246 q.addAll(Arrays.asList(ints)); in testAddAll3() [all …]
|
D | PriorityBlockingQueueTest.java | 155 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 157 ints[i] = i; in testConstructor5() 158 Collection<Integer> elements = Arrays.asList(ints); in testConstructor5() 169 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 171 ints[i] = i; in testConstructor6() 172 PriorityBlockingQueue q = new PriorityBlockingQueue(Arrays.asList(ints)); in testConstructor6() 174 assertEquals(ints[i], q.poll()); in testConstructor6() 184 Integer[] ints = new Integer[SIZE]; in testConstructor7() local 186 ints[i] = new Integer(i); in testConstructor7() 187 q.addAll(Arrays.asList(ints)); in testConstructor7() [all …]
|
D | ThreadLocalRandom8Test.java | 68 () -> r.ints(-1L), in testBadStreamSize() 69 () -> r.ints(-1L, 2, 3), in testBadStreamSize() 85 () -> r.ints(2, 1), in testBadStreamBounds() 86 () -> r.ints(10, 42, 42), in testBadStreamBounds() 104 r.ints(size).parallel().forEach(x -> counter.increment()); in testIntsCount() 150 r.ints(size, lo, hi).parallel().forEach( in testBoundedInts() 204 r.ints().limit(size).parallel().forEach(x -> counter.increment()); in testUnsizedIntsCount() 237 r.ints().limit(size).forEach(x -> counter.increment()); in testUnsizedIntsCountSeq()
|
D | LinkedBlockingQueueTest.java | 147 Integer[] ints = new Integer[SIZE]; in testConstructor5() local 149 ints[i] = new Integer(i); in testConstructor5() 150 Collection<Integer> elements = Arrays.asList(ints); in testConstructor5() 161 Integer[] ints = new Integer[SIZE]; in testConstructor6() local 163 ints[i] = new Integer(i); in testConstructor6() 164 LinkedBlockingQueue q = new LinkedBlockingQueue(Arrays.asList(ints)); in testConstructor6() 166 assertEquals(ints[i], q.poll()); in testConstructor6() 241 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 243 ints[i] = new Integer(i); in testAddAll3() 244 Collection<Integer> elements = Arrays.asList(ints); in testAddAll3() [all …]
|
D | TreeSubSetTest.java | 215 Integer[] ints = new Integer[SIZE]; in testAddAll2() local 217 q.addAll(Arrays.asList(ints)); in testAddAll2() 228 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 230 ints[i] = new Integer(i + SIZE); in testAddAll3() 232 q.addAll(Arrays.asList(ints)); in testAddAll3() 242 Integer[] ints = new Integer[SIZE]; in testAddAll5() local 244 ints[i] = new Integer(SIZE - 1 - i); in testAddAll5() 247 assertTrue(q.addAll(Arrays.asList(ints))); in testAddAll5() 446 Integer[] ints = new Integer[SIZE]; in testToArray2() local 447 Integer[] array = q.toArray(ints); in testToArray2() [all …]
|
D | ConcurrentSkipListSubSetTest.java | 218 Integer[] ints = new Integer[SIZE]; in testAddAll2() local 220 q.addAll(Arrays.asList(ints)); in testAddAll2() 231 Integer[] ints = new Integer[SIZE]; in testAddAll3() local 233 ints[i] = new Integer(i + SIZE); in testAddAll3() 235 q.addAll(Arrays.asList(ints)); in testAddAll3() 245 Integer[] ints = new Integer[SIZE]; in testAddAll5() local 247 ints[i] = new Integer(SIZE - 1 - i); in testAddAll5() 250 assertTrue(q.addAll(Arrays.asList(ints))); in testAddAll5() 449 Integer[] ints = new Integer[SIZE]; in testToArray2() local 450 Integer[] array = q.toArray(ints); in testToArray2() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | RandomTest.java | 54 int[] streamRands = new Random(0).ints().limit(limit).toArray(); in test_ints$() 67 int[] streamRands = new Random(0).ints(size).toArray(); in test_ints$L() 69 assertEquals(size, new Random(0).ints(size).count()); in test_ints$L() 72 new Random(0).ints(-1); in test_ints$L() 87 int[] streamRands = new Random(0).ints(origin, bound).limit(limit).toArray(); in test_ints$II() 91 new Random(0).ints(100, 0); in test_ints$II() 106 int[] streamRands = new Random(0).ints(size, origin, bound).toArray(); in test_ints$LII() 108 assertEquals(size, new Random(0).ints(size, origin, bound).count()); in test_ints$LII() 111 new Random(0).ints(-1, 10, 20); in test_ints$LII() 115 new Random(0).ints(10, 100, 0); in test_ints$LII() [all …]
|
D | PrimitiveIteratorTest.java | 32 private final int[] ints; field in PrimitiveIteratorTest.CannedIntIterator 35 public CannedIntIterator(int[] ints) { in CannedIntIterator() argument 36 this.ints = ints; in CannedIntIterator() 42 return ints[idx++]; in nextInt() 47 return idx < ints.length; in hasNext()
|