/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | IntSliceOpTest.java | 74 … exerciseOps(IntStream.range(1, 2).toArray(), s -> s.skip(0), IntStream.range(1, 2).toArray()); in testSkip() 75 exerciseOps(IntStream.range(1, 2).toArray(), s -> s.skip(1), EMPTY_INT_ARRAY); in testSkip() 76 … exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(0), IntStream.range(1, 101).toArray()); in testSkip() 77 …exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(10), IntStream.range(11, 101).toArray()… in testSkip() 78 exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(100), EMPTY_INT_ARRAY); in testSkip() 79 exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(200), EMPTY_INT_ARRAY); in testSkip() 96 exerciseOps(IntStream.range(1, 2).toArray(), s -> s.limit(0), EMPTY_INT_ARRAY); in testLimit() 97 … exerciseOps(IntStream.range(1, 2).toArray(), s -> s.limit(1), IntStream.range(1, 2).toArray()); in testLimit() 98 exerciseOps(IntStream.range(1, 101).toArray(), s -> s.limit(0), EMPTY_INT_ARRAY); in testLimit() 99 …exerciseOps(IntStream.range(1, 101).toArray(), s -> s.limit(10), IntStream.range(1, 11).toArray()); in testLimit() [all …]
|
D | DoublePrimitiveOpsTests.java | 47 double[] array = LongStream.range(1, 10).asDoubleStream().map(i -> i * 2).toArray(); in testToArray() 52 … double[] array = LongStream.range(1, 10).parallel().asDoubleStream().map(i -> i * 2).toArray(); in testToArray() 60 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSort() 65 double[] array = Arrays.stream(content).sorted().toArray(); in testSort() 70 double[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort() 78 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSortSort() 83 double[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort() 88 double[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort() 97 double[] actual = DoubleStream.iterate(1.0, i -> i + 1.0).limit(9).toArray(); in testLimit() 102 … double[] actual = LongStream.range(1, 100).parallel().asDoubleStream().limit(9).toArray(); in testLimit()
|
D | ToArrayOpTest.java | 55 assertCountSum(Arrays.asList(countTo(0).stream().toArray()), 0, 0); in testToArray() 56 assertCountSum(Arrays.asList(countTo(10).stream().toArray()), 10, 55); in testToArray() 61 exerciseTerminalOps(data, s -> s.toArray()); in testOps() 69 …Object[] objects = exerciseTerminalOps(data, s -> s.map(i -> (Integer) (i + i)), s -> s.toArray()); in testOpsWithMap() 78 Object[] objects = exerciseTerminalOps(data, s -> s.sorted(), s -> s.toArray()); in testOpsWithSorted() 89 s -> s.toArray()); in testOpsWithFlatMap() 98 exerciseTerminalOps(data, s -> s.filter(LambdaTestHelpers.pEven), s -> s.toArray()); in testOpsWithFilter() 108 s -> s.toArray(Integer[]::new)); in testAsArrayWithType() 122 exerciseTerminalOps(data, f, s -> s.toArray()); in testDistinctAndSortedPermutations() 124 Integer[] is = exerciseTerminalOps(data, f, s -> s.toArray(Integer[]::new)); in testDistinctAndSortedPermutations() [all …]
|
D | IntPrimitiveOpsTests.java | 90 int[] array = IntStream.range(1, 10).map(i -> i * 2).toArray(); in testToArray() 95 int[] array = IntStream.range(1, 10).parallel().map(i -> i * 2).toArray(); in testToArray() 103 int[] content = IntStream.generate(() -> r.nextInt(100)).limit(10).toArray(); in testSort() 108 int[] array = Arrays.stream(content).sorted().toArray(); in testSort() 113 int[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort() 121 int[] content = IntStream.generate(() -> r.nextInt(100)).limit(10).toArray(); in testSortSort() 126 int[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort() 131 int[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort() 138 int[] expected = IntStream.range(1, 1000).toArray(); in testSequential() 170 int[] expected = IntStream.range(1, 10).toArray(); in testLimit() [all …]
|
D | LongPrimitiveOpsTests.java | 90 long[] array = LongStream.range(1, 10).map(i -> i * 2).toArray(); in testToArray() 95 long[] array = LongStream.range(1, 10).parallel().map(i -> i * 2).toArray(); in testToArray() 103 long[] content = LongStream.generate(() -> r.nextLong()).limit(10).toArray(); in testSort() 108 long[] array = Arrays.stream(content).sorted().toArray(); in testSort() 113 long[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort() 121 long[] content = LongStream.generate(() -> r.nextLong()).limit(10).toArray(); in testSortSort() 126 long[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort() 131 long[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort() 138 long[] expected = LongStream.range(1, 1000).toArray(); in testSequential() 170 long[] expected = LongStream.range(1, 10).toArray(); in testLimit() [all …]
|
D | StreamBuilderTest.java | 54 return sizes.stream().map(i -> new Object[] { i }).toArray(Object[][]::new); in createStreamBuilders() 188 expectedResult(IntStream.range(0, size).toArray()). in testIntStreamBuilder() 193 expectedResult(IntStream.range(0, size).toArray()). in testIntStreamBuilder() 250 expectedResult(LongStream.range(0, size).toArray()). in testLongStreamBuilder() 255 expectedResult(LongStream.range(0, size).toArray()). in testLongStreamBuilder() 311 expectedResult(IntStream.range(0, size).asDoubleStream().toArray()). in testDoubleStreamBuilder() 316 expectedResult(IntStream.range(0, size).asDoubleStream().toArray()). in testDoubleStreamBuilder()
|
D | RangeTest.java | 71 int[] inc = IntStream.range(start, end).toArray(); in testIntRange() 91 int[] inc = IntStream.rangeClosed(start, end).toArray(); in testIntRange() 102 int[] inc = IntStream.rangeClosed(Integer.MAX_VALUE - 1, Integer.MAX_VALUE).toArray(); in testIntRange() 107 inc = IntStream.rangeClosed(Integer.MAX_VALUE, Integer.MAX_VALUE).toArray(); in testIntRange() 161 long[] inc = LongStream.range(start, end).toArray(); in testLongRange() 181 long[] inc = LongStream.rangeClosed(start, end).toArray(); in testLongRange() 192 long[] inc = LongStream.rangeClosed(Long.MAX_VALUE - 1, Long.MAX_VALUE).toArray(); in testLongRange() 197 inc = LongStream.rangeClosed(Long.MAX_VALUE, Long.MAX_VALUE).toArray(); in testLongRange()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringBufferTest.java | 31 assertTrue(Arrays.equals(expected, s.chars().toArray())); in testChars() 36 assertTrue(Arrays.equals(new int[]{high, low, low}, surrogateCP.chars().toArray())); in testChars() 45 assertTrue(Arrays.equals(expected, s.codePoints().toArray())); in testCodePoints() 50 assertEquals(Character.toCodePoint(high, low), surrogateCP.codePoints().toArray()[0]); in testCodePoints() 51 assertEquals((int) low, surrogateCP.codePoints().toArray()[1]); // Unmatched surrogate. in testCodePoints() 52 assertEquals((int) '0', surrogateCP.codePoints().toArray()[2]); in testCodePoints()
|
D | StringBuilderTest.java | 141 assertTrue(Arrays.equals(expected, s.chars().toArray())); in testChars() 146 assertTrue(Arrays.equals(new int[]{high, low, low}, surrogateCP.chars().toArray())); in testChars() 155 assertTrue(Arrays.equals(expected, s.codePoints().toArray())); in testCodePoints() 160 assertEquals(Character.toCodePoint(high, low), surrogateCP.codePoints().toArray()[0]); in testCodePoints() 161 assertEquals((int) low, surrogateCP.codePoints().toArray()[1]); // Unmatched surrogate. in testCodePoints() 162 assertEquals((int) '0', surrogateCP.codePoints().toArray()[2]); in testCodePoints()
|
/libcore/luni/src/test/java/libcore/java/nio/ |
D | CharBufferTest.java | 36 assertTrue(Arrays.equals(expected, cb.chars().limit(s.length()).toArray())); in testChars() 46 assertTrue(Arrays.equals(expected, cb.codePoints().limit(s.length()).toArray())); in testCodePoints() 53 assertEquals(Character.toCodePoint(high, low), cb.codePoints().toArray()[0]); in testCodePoints() 54 assertEquals((int) low, cb.codePoints().toArray()[1]); // Unmatched surrogate. in testCodePoints() 55 assertEquals((int) '0', cb.codePoints().toArray()[2]); in testCodePoints()
|
/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() 87 int[] streamRands = new Random(0).ints(origin, bound).limit(limit).toArray(); in test_ints$II() 106 int[] streamRands = new Random(0).ints(size, origin, bound).toArray(); in test_ints$LII() 129 long[] streamRands = new Random(0).longs().limit(limit).toArray(); in test_longs$() 142 long[] streamRands = new Random(0).longs(size).toArray(); in test_longs$L() 162 long[] streamRands = new Random(0).longs(origin, bound).limit(limit).toArray(); in test_longs$II() 181 long[] streamRands = new Random(0).longs(size, origin, bound).toArray(); in test_longs$LII() 204 double[] streamRands = new Random(0).doubles().limit(limit).toArray(); in test_doubles$() 217 double[] streamRands = new Random(0).doubles(size).toArray(); in test_doubles$L() [all …]
|
D | AbstractCollectionTest.java | 36 m.values().toArray(); in test_toArray() 37 m.values().toArray(new Integer[m.size()]); in test_toArray()
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | SliceSpliteratorTest.java | 77 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider() 90 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider() 103 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider() 116 … Spliterator.OfDouble s = Arrays.spliterator(source.stream().mapToDouble(i->i).toArray()); in sliceSpliteratorDataProvider() 133 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider() 147 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider() 161 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider() 175 … Spliterator.OfDouble s = Arrays.spliterator(LongStream.range(0, SIZE).asDoubleStream().toArray()); in sliceSpliteratorDataProvider() 183 return data.toArray(new Object[0][]); in sliceSpliteratorDataProvider()
|
D | FlagOpTest.java | 110 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsClearAllSet() 112 FlagDeclaringOp[] opsArray = ops.toArray(new FlagDeclaringOp[ops.size()]); in testFlagsClearAllSet() 149 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsSetAllClear() 151 FlagDeclaringOp[] opsArray = ops.toArray(new FlagDeclaringOp[ops.size()]); in testFlagsSetAllClear() 183 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsSetSequence() 185 IntermediateTestOp[] opsArray = ops.toArray(new IntermediateTestOp[ops.size()]); in testFlagsSetSequence() 219 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsClearSequence() 221 IntermediateTestOp[] opsArray = ops.toArray(new IntermediateTestOp[ops.size()]); in testFlagsClearSequence() 245 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsSizedOrderedParallelCollect() 247 IntermediateTestOp[] opsArray = ops.toArray(new IntermediateTestOp[ops.size()]); in testFlagsSizedOrderedParallelCollect()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | AbstractCollectionTest.java | 247 Object[] array = ac.toArray(); in test_toArray() 288 ac.toArray(null); in test_toArray$Ljava_lang_Object() 295 ac.toArray(new StringBuffer[ac.size()]); in test_toArray$Ljava_lang_Object() 302 assertSame(a, ac.toArray(a)); in test_toArray$Ljava_lang_Object() 305 assertNotSame(a, ac.toArray(a)); in test_toArray$Ljava_lang_Object() 306 a = ac.toArray(a); in test_toArray$Ljava_lang_Object() 310 ac.toArray(csa); in test_toArray$Ljava_lang_Object()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_MapTest.java | 135 T[] set1TypedArray1 = set1.toArray(zeroLengthArray); in crossCheckOrdering() 159 T[] set1TypedArray2 = set1.toArray(parameterArray1); in crossCheckOrdering() 164 Object[] set1UntypedArray = set1.toArray(); in crossCheckOrdering() 169 T[] set2TypedArray1 = set2.toArray(zeroLengthArray); in crossCheckOrdering() 175 T[] set2TypedArray2 = set1.toArray(parameterArray2); in crossCheckOrdering() 180 Object[] set2UntypedArray = set2.toArray(); in crossCheckOrdering()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | CopyOnWriteArraySetTest.java | 312 Object[] a = new CopyOnWriteArraySet().toArray(); in testToArray() 322 assertTrue(Arrays.equals(elements, full.toArray())); in testToArray() 323 assertSame(Object[].class, full.toArray().getClass()); in testToArray() 335 assertSame(a, empty.toArray(a)); in testToArray2() 339 assertSame(a, empty.toArray(a)); in testToArray2() 351 assertTrue(Arrays.equals(elements, full.toArray(a))); in testToArray2() 354 assertSame(Integer[].class, full.toArray(a).getClass()); in testToArray2() 358 assertSame(a, full.toArray(a)); in testToArray2() 363 assertSame(a, full.toArray(a)); in testToArray2() 379 c.toArray(new Long[5]); in testToArray_ArrayStoreException() [all …]
|
D | CopyOnWriteArrayListTest.java | 432 Object[] a = new CopyOnWriteArrayList().toArray(); in testToArray() 442 assertTrue(Arrays.equals(elements, full.toArray())); in testToArray() 443 assertSame(Object[].class, full.toArray().getClass()); in testToArray() 455 assertSame(a, empty.toArray(a)); in testToArray2() 459 assertSame(a, empty.toArray(a)); in testToArray2() 471 assertTrue(Arrays.equals(elements, full.toArray(a))); in testToArray2() 474 assertSame(Integer[].class, full.toArray(a).getClass()); in testToArray2() 478 assertSame(a, full.toArray(a)); in testToArray2() 483 assertSame(a, full.toArray(a)); in testToArray2() 524 c.toArray(new Long[5]); in testToArray_ArrayStoreException() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Set.java | 146 Object[] toArray(); in toArray() method 190 <T> T[] toArray(T[] a); in toArray() method
|
D | List.java | 170 Object[] toArray(); in toArray() method 211 <T> T[] toArray(T[] a); in toArray() method 500 Object[] a = this.toArray(); in sort()
|
D | Collection.java | 207 Object[] toArray(); in toArray() method 252 <T> T[] toArray(T[] a); in toArray() method
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | CopyOnWriteArraySet.java | 177 public Object[] toArray() { in toArray() method in CopyOnWriteArraySet 178 return al.toArray(); in toArray() 222 public <T> T[] toArray(T[] a) { in toArray() method in CopyOnWriteArraySet 223 return al.toArray(a); in toArray()
|
D | DelayQueue.java | 428 public Object[] toArray() { in toArray() method in DelayQueue 432 return q.toArray(); in toArray() 473 public <T> T[] toArray(T[] a) { in toArray() method in DelayQueue 477 return q.toArray(a); in toArray() 526 return new Itr(toArray()); in iterator()
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | AbstractCollection.annotated.java | 43 public java.lang.@libcore.util.Nullable Object @libcore.util.NonNull [] toArray() { throw new Runti… in toArray() method in AbstractCollection 45 public <T> T @libcore.util.NonNull [] toArray(T @libcore.util.NonNull [] a) { throw new RuntimeExce… in toArray() method in AbstractCollection
|
D | Set.annotated.java | 41 public java.lang.@libcore.util.Nullable Object @libcore.util.NonNull [] toArray(); in toArray() method 44 public <T> T @libcore.util.NonNull [] toArray(T @libcore.util.NonNull [] a); in toArray() method
|