Home
last modified time | relevance | path

Searched refs:doubles (Results 1 – 16 of 16) sorted by relevance

/libcore/luni/src/test/java/libcore/java/lang/reflect/
DArrayTest.java26 private static double[] doubles; field in ArrayTest
37 doubles = new double[] { (double) 0xffffffffffffffffL }; in setUp()
48 try { Array.getBoolean(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean()
60 try { Array.getByte(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetByte()
72 try { Array.getChar(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetChar()
84 assertEquals(doubles[0], Array.getDouble(doubles, 0)); in testGetDouble()
97 try { Array.getFloat(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetFloat()
108 try { Array.getInt(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetInt()
120 try { Array.getLong(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetLong()
132 try { Array.getShort(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetShort()
[all …]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DDoubleStreamTestDataProvider.java85 final double[] doubles = (double[]) data[1];
88 TestData.Factory.ofArray("array:" + name, doubles)}); in list.add() argument
91 for (double i : doubles) {
104 final double[] doubles = (double[]) data[1];
107 for (double i : doubles) {
112 () -> Arrays.spliterator(doubles)));
114 … () -> Arrays.spliterator(doubles, 0, doubles.length / 2)));
120 … () -> Spliterators.spliterator(isl.iterator(), doubles.length, 0)));
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DDoubleStreamTestDataProvider.java84 final double[] doubles = (double[]) data[1];
87 TestData.Factory.ofArray("array:" + name, doubles)}); in list.add() argument
90 for (double i : doubles) {
103 final double[] doubles = (double[]) data[1];
106 for (double i : doubles) {
111 () -> Arrays.spliterator(doubles)));
113 … () -> Arrays.spliterator(doubles, 0, doubles.length / 2)));
119 … () -> Spliterators.spliterator(isl.iterator(), doubles.length, 0)));
/libcore/ojluni/src/main/native/
DObjectOutputStream.c131 jdouble *doubles; in Java_java_io_ObjectOutputStream_doublesToBytes() local
145 doubles = (*env)->GetPrimitiveArrayCritical(env, src, NULL); in Java_java_io_ObjectOutputStream_doublesToBytes()
146 if (doubles == NULL) /* exception thrown */ in Java_java_io_ObjectOutputStream_doublesToBytes()
151 (*env)->ReleasePrimitiveArrayCritical(env, src, doubles, JNI_ABORT); in Java_java_io_ObjectOutputStream_doublesToBytes()
157 (*env)->ReleasePrimitiveArrayCritical(env, src, doubles, JNI_ABORT); in Java_java_io_ObjectOutputStream_doublesToBytes()
164 dval = doubles[srcpos]; in Java_java_io_ObjectOutputStream_doublesToBytes()
183 (*env)->ReleasePrimitiveArrayCritical(env, src, doubles, JNI_ABORT); in Java_java_io_ObjectOutputStream_doublesToBytes()
DObjectInputStream.c128 jdouble *doubles; in Java_java_io_ObjectInputStream_bytesToDoubles() local
151 doubles = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToDoubles()
152 if (doubles == NULL) { /* exception thrown */ in Java_java_io_ObjectInputStream_bytesToDoubles()
170 doubles[dstpos] = (jdouble) u.d; in Java_java_io_ObjectInputStream_bytesToDoubles()
175 (*env)->ReleasePrimitiveArrayCritical(env, dst, doubles, 0); in Java_java_io_ObjectInputStream_bytesToDoubles()
/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandom8Test.java49 () -> r.doubles(-1L), in testBadStreamSize()
50 () -> r.doubles(-1L, .5, .6), in testBadStreamSize()
66 () -> r.doubles(0.0, 0.0), in testBadStreamBounds()
67 () -> r.doubles(10, .5, .4), in testBadStreamBounds()
111 r.doubles(size).parallel().forEach(x -> counter.increment()); in testDoublesCount()
165 r.doubles(size, lo, hi).parallel().forEach( in testBoundedDoubles()
203 r.doubles().limit(size).parallel().forEach(x -> counter.increment()); in testUnsizedDoublesCount()
236 r.doubles().limit(size).forEach(x -> counter.increment()); in testUnsizedDoublesCountSeq()
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java204 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()
219 assertEquals(size, new Random(0).doubles(size).count()); in test_doubles$L()
241 double[] streamRands = new Random(0).doubles(origin, bound).limit(limit).toArray(); in test_doubles$II()
245 new Random(0).doubles(100, 0); in test_doubles$II()
264 double[] streamRands = new Random(0).doubles(size, origin, bound).toArray(); in test_doubles$LII()
266 assertEquals(size, new Random(0).doubles(size, origin, bound).count()); in test_doubles$LII()
269 new Random(0).doubles(-1, 10, 20); in test_doubles$LII()
273 new Random(0).doubles(10, 100, 0); in test_doubles$LII()
DPrimitiveIteratorTest.java72 private final double[] doubles; field in PrimitiveIteratorTest.CannedDoubleIterator
75 public CannedDoubleIterator(double[] doubles) { in CannedDoubleIterator() argument
76 this.doubles = doubles; in CannedDoubleIterator()
82 return doubles[idx++]; in nextDouble()
87 return idx < doubles.length; in hasNext()
/libcore/luni/src/test/java/libcore/java/nio/
DBufferTest.java140 double[] doubles = new double[3]; in testByteSwappedBulkGet() local
141 b.order(ByteOrder.BIG_ENDIAN).asDoubleBuffer().get(doubles, 1, 1); in testByteSwappedBulkGet()
142 assertEquals(0, Double.doubleToRawLongBits(doubles[0])); in testByteSwappedBulkGet()
143 assertEquals(0x0102030405060708L, Double.doubleToRawLongBits(doubles[1])); in testByteSwappedBulkGet()
144 assertEquals(0, Double.doubleToRawLongBits(doubles[2])); in testByteSwappedBulkGet()
145 b.order(ByteOrder.LITTLE_ENDIAN).asDoubleBuffer().get(doubles, 1, 1); in testByteSwappedBulkGet()
146 assertEquals(0, Double.doubleToRawLongBits(doubles[0])); in testByteSwappedBulkGet()
147 assertEquals(0x0807060504030201L, Double.doubleToRawLongBits(doubles[1])); in testByteSwappedBulkGet()
148 assertEquals(0, Double.doubleToRawLongBits(doubles[2])); in testByteSwappedBulkGet()
230 double[] doubles = new double[] { 0, Double.longBitsToDouble(0x0102030405060708L), 0 }; in testByteSwappedBulkPut() local
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DSortedOps.java680 double[] doubles = b.asPrimitiveArray(); in end() local
681 Arrays.sort(doubles); in end()
682 downstream.begin(doubles.length); in end()
684 for (double aDouble : doubles) in end()
688 for (double aDouble : doubles) { in end()
/libcore/ojluni/src/main/java/java/util/
DRandom.java889 public DoubleStream doubles(long streamSize) { in doubles() method in Random
912 public DoubleStream doubles() { in doubles() method in Random
946 public DoubleStream doubles(long streamSize, double randomNumberOrigin, in doubles() method in Random
985 public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { in doubles() method in Random
DSplittableRandom.java745 public DoubleStream doubles(long streamSize) { in doubles() method in SplittableRandom
764 public DoubleStream doubles() { in doubles() method in SplittableRandom
787 public DoubleStream doubles(long streamSize, double randomNumberOrigin, in doubles() method in SplittableRandom
814 public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { in doubles() method in SplittableRandom
/libcore/luni/src/main/java/java/util/concurrent/
DThreadLocalRandom.java622 public DoubleStream doubles(long streamSize) { in doubles() method in ThreadLocalRandom
642 public DoubleStream doubles() { in doubles() method in ThreadLocalRandom
665 public DoubleStream doubles(long streamSize, double randomNumberOrigin, in doubles() method in ThreadLocalRandom
693 public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { in doubles() method in ThreadLocalRandom
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DToArrayOpTest.java369 double[] doubles = exerciseTerminalOps(data, s -> s.map(i -> i + i), s -> s.toArray());
370 assertTrue(doubles.length == data.size());
378 … double[] doubles = exerciseTerminalOps(data, s -> s.sorted(), (DoubleStream s) -> s.toArray());
379 assertTrue(doubles.length == data.size());
DInfiniteStreamWithLimitOpTest.java166 private TestData.OfDouble doubles() {
217 withData(doubles()).
265 withData(doubles()).
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationStressTest1.java570 double[] doubles = { 0.0, 1.1, 2.2, 3.3 }; in test_18_8_writeObject() local
571 objToSave = doubles; in test_18_8_writeObject()