Home
last modified time | relevance | path

Searched refs:ints (Results 1 – 25 of 46) sorted by relevance

12

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DStreamCloseTest.java42 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/testlib/org/openjdk/testlib/java/util/stream/
DIntStreamTestDataProvider.java88 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 …]
DStreamTestDataProvider.java96 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/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DIntStreamTestDataProvider.java84 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 …]
DStreamTestDataProvider.java90 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/luni/src/test/java/libcore/java/lang/reflect/
DArrayTest.java28 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/
DAbstractQueueTest.java147 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()
DPriorityQueueTest.java96 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 …]
DConcurrentLinkedQueueTest.java78 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 …]
DPriorityBlockingQueueTest.java125 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 …]
DThreadLocalRandom8Test.java45 () -> 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()
DLinkedBlockingQueueTest.java117 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 …]
DTreeSetTest.java108 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 …]
DConcurrentSkipListSubSetTest.java195 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 …]
DTreeSubSetTest.java192 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 …]
DConcurrentLinkedDequeTest.java81 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
83 ints[i] = new Integer(i); in testConstructor5()
85 new ConcurrentLinkedDeque(Arrays.asList(ints)); in testConstructor5()
94 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
96 ints[i] = new Integer(i); in testConstructor6()
97 ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(Arrays.asList(ints)); in testConstructor6()
99 assertEquals(ints[i], q.poll()); in testConstructor6()
337 Integer[] ints = new Integer[SIZE]; in testAddAll3() local
339 ints[i] = new Integer(i); in testAddAll3()
341 q.addAll(Arrays.asList(ints)); in testAddAll3()
[all …]
DSynchronousQueueTest.java112 Integer[] ints = new Integer[1]; in testAddAll_ISE() local
113 for (int i = 0; i < ints.length; i++) in testAddAll_ISE()
114 ints[i] = i; in testAddAll_ISE()
115 Collection<Integer> coll = Arrays.asList(ints); in testAddAll_ISE()
363 Integer[] ints = new Integer[1]; ints[0] = zero;
364 assertFalse(q.containsAll(Arrays.asList(ints)));
376 Integer[] ints = new Integer[1]; ints[0] = zero;
377 assertFalse(q.retainAll(Arrays.asList(ints)));
389 Integer[] ints = new Integer[1]; ints[0] = zero;
390 assertFalse(q.containsAll(Arrays.asList(ints)));
DConcurrentSkipListSetTest.java104 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
106 ints[i] = new Integer(i); in testConstructor5()
108 new ConcurrentSkipListSet(Arrays.asList(ints)); in testConstructor5()
117 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
119 ints[i] = new Integer(i); in testConstructor6()
120 ConcurrentSkipListSet q = new ConcurrentSkipListSet(Arrays.asList(ints)); in testConstructor6()
122 assertEquals(ints[i], q.pollFirst()); in testConstructor6()
132 Integer[] ints = new Integer[SIZE]; in testConstructor7() local
134 ints[i] = new Integer(i); in testConstructor7()
135 q.addAll(Arrays.asList(ints)); in testConstructor7()
[all …]
DLinkedListTest.java66 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
68 ints[i] = i; in testConstructor6()
69 LinkedList q = new LinkedList(Arrays.asList(ints)); in testConstructor6()
71 assertEquals(ints[i], q.poll()); in testConstructor6()
149 Integer[] ints = new Integer[SIZE]; in testAddAll5() local
151 ints[i] = i; in testAddAll5()
154 assertTrue(q.addAll(Arrays.asList(ints))); in testAddAll5()
156 assertEquals(ints[i], q.poll()); in testAddAll5()
352 Integer[] ints = new Integer[SIZE]; in testToArray2() local
353 Integer[] array = q.toArray(ints); in testToArray2()
[all …]
DArrayBlockingQueueTest.java113 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
115 ints[i] = i; in testConstructor5()
116 Collection<Integer> elements = Arrays.asList(ints); in testConstructor5()
127 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
129 ints[i] = i; in testConstructor6()
130 Collection<Integer> elements = Arrays.asList(ints); in testConstructor6()
141 Integer[] ints = new Integer[SIZE]; in testConstructor7() local
143 ints[i] = i; in testConstructor7()
144 Collection<Integer> elements = Arrays.asList(ints); in testConstructor7()
147 assertEquals(ints[i], q.poll()); in testConstructor7()
[all …]
DDelayQueueTest.java196 PDelay[] ints = new PDelay[SIZE]; in testConstructor6() local
198 ints[i] = new PDelay(i); in testConstructor6()
199 DelayQueue q = new DelayQueue(Arrays.asList(ints)); in testConstructor6()
201 assertEquals(ints[i], q.poll()); in testConstructor6()
287 PDelay[] ints = new PDelay[SIZE]; in testAddAll5() local
289 ints[i] = new PDelay(i); in testAddAll5()
292 assertTrue(q.addAll(Arrays.asList(ints))); in testAddAll5()
294 assertEquals(ints[i], q.poll()); in testAddAll5()
601 PDelay[] ints = new PDelay[SIZE]; in testToArray2() local
602 PDelay[] array = q.toArray(ints); in testToArray2()
[all …]
DLinkedTransferQueueTest.java98 Integer[] ints = new Integer[SIZE]; in testConstructor4() local
100 ints[i] = i; in testConstructor4()
101 Collection<Integer> elements = Arrays.asList(ints); in testConstructor4()
112 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
114 ints[i] = i; in testConstructor5()
116 List intList = Arrays.asList(ints); in testConstructor5()
128 assertEquals(ints[i], q.poll()); in testConstructor5()
166 Integer[] ints = new Integer[SIZE]; in testAddAll3() local
168 ints[i] = i; in testAddAll3()
170 q.addAll(Arrays.asList(ints)); in testAddAll3()
[all …]
DArrayDequeTest.java77 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
79 ints[i] = new Integer(i); in testConstructor5()
81 new ArrayDeque(Arrays.asList(ints)); in testConstructor5()
90 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
92 ints[i] = new Integer(i); in testConstructor6()
93 ArrayDeque q = new ArrayDeque(Arrays.asList(ints)); in testConstructor6()
95 assertEquals(ints[i], q.pollFirst()); in testConstructor6()
322 Integer[] ints = new Integer[SIZE]; in testAddAll3() local
324 ints[i] = new Integer(i); in testAddAll3()
326 q.addAll(Arrays.asList(ints)); in testAddAll3()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java54 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 …]
DPrimitiveIteratorTest.java32 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()

12