Home
last modified time | relevance | path

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

1234

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DStreamCloseTest.java50 try (Stream<Integer> ints = countTo(100).stream()) { in testEmptyCloseHandler() argument
51 ints.forEach(i -> {}); in testEmptyCloseHandler()
59 try (Stream<Integer> ints = countTo(100).stream()) { in testOneCloseHandler() argument
60 ints.onClose(closer); in testOneCloseHandler()
61 ints.forEach(i -> {}); in testOneCloseHandler()
66 try (Stream<Integer> ints = countTo(100).stream().onClose(closer)) { in testOneCloseHandler() argument
67 ints.forEach(i -> {}); in testOneCloseHandler()
72 try (Stream<Integer> ints = countTo(100).stream().filter(e -> true).onClose(closer)) { in testOneCloseHandler() argument
73 ints.forEach(i -> {}); in testOneCloseHandler()
78 …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/ojluni/src/test/java/util/concurrent/tck/
DPriorityQueueTest.java133 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
135 ints[i] = new Integer(i); in testConstructor5()
137 new PriorityQueue(Arrays.asList(ints)); in testConstructor5()
146 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
148 ints[i] = new Integer(i); in testConstructor6()
149 PriorityQueue q = new PriorityQueue(Arrays.asList(ints)); in testConstructor6()
151 assertEquals(ints[i], q.poll()); in testConstructor6()
161 Integer[] ints = new Integer[SIZE]; in testConstructor7() local
163 ints[i] = new Integer(i); in testConstructor7()
164 q.addAll(Arrays.asList(ints)); in testConstructor7()
[all …]
DAbstractQueueTest.java170 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()
DConcurrentLinkedQueueTest.java111 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 …]
DPriorityBlockingQueueTest.java155 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 …]
DThreadLocalRandom8Test.java68 () -> 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()
DLinkedBlockingQueueTest.java147 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 …]
DTreeSubSetTest.java215 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 …]
DConcurrentSkipListSubSetTest.java218 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/jsr166-tests/src/test/java/jsr166/
DPriorityQueueTest.java96 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
98 ints[i] = Integer.valueOf(i); in testConstructor5()
100 new PriorityQueue(Arrays.asList(ints)); in testConstructor5()
109 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
111 ints[i] = Integer.valueOf(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] = Integer.valueOf(i); in testConstructor7()
127 q.addAll(Arrays.asList(ints)); in testConstructor7()
[all …]
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] = Integer.valueOf(i); in testAddAll3()
164 q.addAll(Arrays.asList(ints)); in testAddAll3()
174 Integer[] ints = new Integer[SIZE]; in testAddAll4() local
176 ints[i] = Integer.valueOf(i); in testAddAll4()
178 q.addAll(Arrays.asList(ints)); in testAddAll4()
DConcurrentLinkedQueueTest.java78 Integer[] ints = new Integer[SIZE]; in testConstructor5() local
80 ints[i] = Integer.valueOf(i); in testConstructor5()
82 new ConcurrentLinkedQueue(Arrays.asList(ints)); in testConstructor5()
91 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
93 ints[i] = Integer.valueOf(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] = Integer.valueOf(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] = Integer.valueOf(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] = Integer.valueOf(i); in testConstructor5()
120 Collection<Integer> elements = Arrays.asList(ints); in testConstructor5()
131 Integer[] ints = new Integer[SIZE]; in testConstructor6() local
133 ints[i] = Integer.valueOf(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] = Integer.valueOf(i); in testAddAll3()
214 Collection<Integer> elements = Arrays.asList(ints); in testAddAll3()
[all …]
/libcore/ojluni/src/main/java/java/util/
DSplittableRandom.java386 public IntStream ints(long streamSize) { in ints() method in SplittableRandom
387 return proxy.ints(streamSize); in ints()
400 public IntStream ints() { in ints() method in SplittableRandom
401 return proxy.ints(); in ints()
420 public IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound) { in ints() method in SplittableRandom
421 return proxy.ints(streamSize, randomNumberOrigin, randomNumberBound); in ints()
440 public IntStream ints(int randomNumberOrigin, int randomNumberBound) { in ints() method in SplittableRandom
441 return proxy.ints(randomNumberOrigin, randomNumberBound); in ints()
DRandom.java648 public IntStream ints(long streamSize) { in ints() method in Random
649 return AbstractSpliteratorGenerator.ints(this, streamSize); in ints()
666 public IntStream ints() { in ints() method in Random
672 return AbstractSpliteratorGenerator.ints(this); in ints()
725 public IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound) { in ints() method in Random
731 … return AbstractSpliteratorGenerator.ints(this, streamSize, randomNumberOrigin, randomNumberBound); in ints()
775 public IntStream ints(int randomNumberOrigin, int randomNumberBound) { in ints() method in Random
781 return AbstractSpliteratorGenerator.ints(this, randomNumberOrigin, randomNumberBound); in ints()
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java76 int[] streamRands = new Random(0).ints().limit(limit).toArray(); in test_ints$()
90 int[] streamRands = new Random(0).ints(size).toArray(); in test_ints$L()
92 assertEquals(size, new Random(0).ints(size).count()); in test_ints$L()
95 new Random(0).ints(-1); in test_ints$L()
112 int[] streamRands = new Random(0).ints(origin, bound).limit(limit).toArray(); in test_ints$II()
116 new Random(0).ints(100, 0); in test_ints$II()
133 int[] streamRands = new Random(0).ints(size, origin, bound).toArray(); in test_ints$LII()
135 assertEquals(size, new Random(0).ints(size, origin, bound).count()); in test_ints$LII()
138 new Random(0).ints(-1, 10, 20); in test_ints$LII()
142 new Random(0).ints(10, 100, 0); in test_ints$LII()
[all …]
/libcore/ojluni/annotations/flagged_api/java/util/concurrent/
DThreadLocalRandom.annotated.java81 public java.util.stream.IntStream ints(long streamSize) { throw new RuntimeException("Stub!"); } in ints() method in ThreadLocalRandom
83 public java.util.stream.IntStream ints() { throw new RuntimeException("Stub!"); } in ints() method in ThreadLocalRandom
85 public java.util.stream.IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBou… in ints() method in ThreadLocalRandom
87 public java.util.stream.IntStream ints(int randomNumberOrigin, int randomNumberBound) { throw new R… in ints() method in ThreadLocalRandom
/libcore/ojluni/src/main/java/java/util/concurrent/
DThreadLocalRandom.java548 public IntStream ints(long streamSize) { in ints() method in ThreadLocalRandom
549 return AbstractSpliteratorGenerator.ints(ThreadLocalRandomProxy.PROXY, streamSize); in ints()
559 public IntStream ints() { in ints() method in ThreadLocalRandom
560 return AbstractSpliteratorGenerator.ints(ThreadLocalRandomProxy.PROXY); in ints()
569 public IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound) { in ints() method in ThreadLocalRandom
570 …return AbstractSpliteratorGenerator.ints(ThreadLocalRandomProxy.PROXY, streamSize, randomNumberOri… in ints()
581 public IntStream ints(int randomNumberOrigin, int randomNumberBound) { in ints() method in ThreadLocalRandom
582 …return AbstractSpliteratorGenerator.ints(ThreadLocalRandomProxy.PROXY, randomNumberOrigin, randomN… in ints()

1234