/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | LongTest.java | 41 Long l = new Long(127); in test_byteValue() 43 assertEquals("Returned incorrect byte value", -1, new Long(Long.MAX_VALUE) in test_byteValue() 52 assertTrue("-2 compared to 1 gave non-negative answer", new Long(-2L) in test_compareToLjava_lang_Long() 53 .compareTo(new Long(1L)) < 0); in test_compareToLjava_lang_Long() 54 assertEquals("-2 compared to -2 gave non-zero answer", 0, new Long(-2L) in test_compareToLjava_lang_Long() 55 .compareTo(new Long(-2L))); in test_compareToLjava_lang_Long() 56 assertTrue("3 compared to 2 gave non-positive answer", new Long(3L) in test_compareToLjava_lang_Long() 57 .compareTo(new Long(2L)) > 0); in test_compareToLjava_lang_Long() 60 new Long(0).compareTo(null); in test_compareToLjava_lang_Long() 72 assertEquals("Returned incorrect value for hex string", 255L, Long.decode( in test_decodeLjava_lang_String2() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | LongTest.java | 30 assertNull(Long.getLong("testIncLong")); in testSystemProperties() 31 assertEquals(new Long(4), Long.getLong("testIncLong", 4L)); in testSystemProperties() 32 assertEquals(new Long(4), Long.getLong("testIncLong", new Long(4))); in testSystemProperties() 39 final long min = Long.MIN_VALUE; in testCompare() 41 final long max = Long.MAX_VALUE; in testCompare() 42 assertTrue(Long.compare(max, max) == 0); in testCompare() 43 assertTrue(Long.compare(min, min) == 0); in testCompare() 44 assertTrue(Long.compare(zero, zero) == 0); in testCompare() 45 assertTrue(Long.compare(max, zero) > 0); in testCompare() 46 assertTrue(Long.compare(max, min) > 0); in testCompare() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ConcurrentHashMap8Test.java | 589 static ConcurrentHashMap<Long, Long> longMap; 591 static ConcurrentHashMap<Long, Long> longMap() { in longMap() 593 longMap = new ConcurrentHashMap<Long, Long>(SIZE); in longMap() 595 longMap.put(Long.valueOf(i), Long.valueOf(2 *i)); in longMap() 601 …tic class AddKeys implements BiFunction<Map.Entry<Long,Long>, Map.Entry<Long,Long>, Map.Entry<Long… 602 public Map.Entry<Long,Long> apply(Map.Entry<Long,Long> x, Map.Entry<Long,Long> y) { in apply() argument 603 return new AbstractMap.SimpleEntry<Long,Long> in apply() 604 (Long.valueOf(x.getKey().longValue() + y.getKey().longValue()), in apply() 605 Long.valueOf(1L)); in apply() 614 ConcurrentHashMap<Long, Long> m = longMap(); in testForEachKeySequentially() [all …]
|
D | TimeUnitTest.java | 132 Long.MAX_VALUE, Long.MIN_VALUE, in testConvert() 304 assertEquals(Long.MAX_VALUE, in testConvertSaturate() 305 NANOSECONDS.convert(Long.MAX_VALUE / 2, SECONDS)); in testConvertSaturate() 306 assertEquals(Long.MIN_VALUE, in testConvertSaturate() 307 NANOSECONDS.convert(-Long.MAX_VALUE / 4, SECONDS)); in testConvertSaturate() 308 assertEquals(Long.MAX_VALUE, in testConvertSaturate() 309 NANOSECONDS.convert(Long.MAX_VALUE / 2, MINUTES)); in testConvertSaturate() 310 assertEquals(Long.MIN_VALUE, in testConvertSaturate() 311 NANOSECONDS.convert(-Long.MAX_VALUE / 4, MINUTES)); in testConvertSaturate() 312 assertEquals(Long.MAX_VALUE, in testConvertSaturate() [all …]
|
D | LongAccumulatorTest.java | 55 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testConstructor() 63 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testAccumulateAndGet() 76 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testReset() 87 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testGetThenReset() 98 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testToString() 101 assertEquals(Long.toString(1), ai.toString()); in testToString() 108 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testIntValue() 118 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testLongValue() 128 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testFloatValue() 138 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testDoubleValue() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentHashMap8Test.java | 564 static ConcurrentHashMap<Long, Long> longMap; 566 static ConcurrentHashMap<Long, Long> longMap() { in longMap() 568 longMap = new ConcurrentHashMap<Long, Long>(SIZE); in longMap() 570 longMap.put(Long.valueOf(i), Long.valueOf(2 *i)); in longMap() 576 …tic class AddKeys implements BiFunction<Map.Entry<Long,Long>, Map.Entry<Long,Long>, Map.Entry<Long… 577 public Map.Entry<Long,Long> apply(Map.Entry<Long,Long> x, Map.Entry<Long,Long> y) { in apply() argument 578 return new AbstractMap.SimpleEntry<Long,Long> in apply() 579 (Long.valueOf(x.getKey().longValue() + y.getKey().longValue()), in apply() 580 Long.valueOf(1L)); in apply() 589 ConcurrentHashMap<Long, Long> m = longMap(); in testForEachKeySequentially() [all …]
|
D | LongAccumulatorTest.java | 32 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testConstructor() 40 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testAccumulateAndGet() 53 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testReset() 64 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testGetThenReset() 75 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testToString() 78 assertEquals(Long.toString(1), ai.toString()); in testToString() 85 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testIntValue() 95 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testLongValue() 105 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testFloatValue() 115 LongAccumulator ai = new LongAccumulator(Long::max, 0L); in testDoubleValue() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | ConcurrentHashMapTest.java | 51 static final long SEQUENTIALLY = Long.MAX_VALUE; 55 static class SumKeys implements BiFunction<Map.Entry<Long,Long>, 56 Map.Entry<Long,Long>, Map.Entry<Long,Long>> { 57 public Map.Entry<Long,Long> apply(Map.Entry<Long,Long> x, Map.Entry<Long,Long> y) { in apply() argument 58 return new AbstractMap.SimpleEntry<Long,Long> in apply() 59 (Long.valueOf(x.getKey().longValue() + y.getKey().longValue()), in apply() 60 Long.valueOf(1L)); in apply() 64 static class IncrementKey implements Function<Map.Entry<Long, Long>, Map.Entry<Long, Long>> { 65 public Map.Entry<Long, Long> apply(Map.Entry<Long, Long> in) { in apply() argument 66 return new AbstractMap.SimpleEntry<Long, Long> in apply() [all …]
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | MultiplicationTests.java | 53 {Long.MAX_VALUE, Long.MAX_VALUE}, in testMultiplyHigh() 54 {Long.MAX_VALUE, -Long.MAX_VALUE}, in testMultiplyHigh() 55 {-Long.MAX_VALUE, Long.MAX_VALUE}, in testMultiplyHigh() 56 {-Long.MAX_VALUE, -Long.MAX_VALUE}, in testMultiplyHigh() 57 {Long.MAX_VALUE, Long.MIN_VALUE}, in testMultiplyHigh() 58 {Long.MIN_VALUE, Long.MAX_VALUE}, in testMultiplyHigh() 59 {Long.MIN_VALUE, Long.MIN_VALUE} in testMultiplyHigh()
|
D | DivModTests.java | 163 testLongFloorDivMod(Long.MAX_VALUE, 1, Long.MAX_VALUE, 0L); in testLongFloorDivMod() 164 testLongFloorDivMod(Long.MAX_VALUE, -1, -Long.MAX_VALUE, 0L); in testLongFloorDivMod() 165 testLongFloorDivMod(Long.MAX_VALUE, 3L, Long.MAX_VALUE / 3L, 1L); in testLongFloorDivMod() 166 testLongFloorDivMod(Long.MAX_VALUE - 1L, 3L, (Long.MAX_VALUE - 1L) / 3L, 0L); in testLongFloorDivMod() 167 testLongFloorDivMod(Long.MIN_VALUE, 3L, Long.MIN_VALUE / 3L - 1L, 1L); in testLongFloorDivMod() 168 testLongFloorDivMod(Long.MIN_VALUE + 1L, 3L, Long.MIN_VALUE / 3L - 1L, 2L); in testLongFloorDivMod() 169 testLongFloorDivMod(Long.MIN_VALUE + 1, -1, Long.MAX_VALUE, 0L); in testLongFloorDivMod() 171 testLongFloorDivMod(Long.MIN_VALUE, -1, Long.MIN_VALUE, 0L); in testLongFloorDivMod() 268 testLongIntFloorDivMod(Long.MAX_VALUE, 1, Long.MAX_VALUE, 0); in testLongIntFloorDivMod() 269 testLongIntFloorDivMod(Long.MAX_VALUE, -1, -Long.MAX_VALUE, 0); in testLongIntFloorDivMod() [all …]
|
D | ExactArithTests.java | 185 testLongExactTwice(Long.MIN_VALUE, Long.MIN_VALUE); in testLongExact() 186 testLongExactTwice(Long.MAX_VALUE, Long.MAX_VALUE); in testLongExact() 187 testLongExactTwice(Long.MIN_VALUE, 1); in testLongExact() 188 testLongExactTwice(Long.MAX_VALUE, 1); in testLongExact() 189 testLongExactTwice(Long.MIN_VALUE, 2); in testLongExact() 190 testLongExactTwice(Long.MAX_VALUE, 2); in testLongExact() 191 testLongExactTwice(Long.MIN_VALUE, -1); in testLongExact() 192 testLongExactTwice(Long.MAX_VALUE, -1); in testLongExact() 193 testLongExactTwice(Long.MIN_VALUE, -2); in testLongExact() 194 testLongExactTwice(Long.MAX_VALUE, -2); in testLongExact() [all …]
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | BigDecimalTest.java | 51 String maxLong = Long.toString(Long.MAX_VALUE); in testGetPrecision() 53 String minLong = Long.toString(Long.MIN_VALUE); in testGetPrecision() 135 checkDivide("0", 1, Long.MIN_VALUE, 0, RoundingMode.DOWN); in testDivideRounding() 136 checkDivide("-1", 1, Long.MIN_VALUE, 0, RoundingMode.UP); in testDivideRounding() 137 checkDivide("-1", 1, Long.MIN_VALUE, 0, RoundingMode.FLOOR); in testDivideRounding() 138 checkDivide("0", 1, Long.MIN_VALUE, 0, RoundingMode.CEILING); in testDivideRounding() 139 checkDivide("0", 1, Long.MIN_VALUE, 0, RoundingMode.HALF_EVEN); in testDivideRounding() 140 checkDivide("0", 1, Long.MIN_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding() 141 checkDivide("0", 1, Long.MIN_VALUE, 0, RoundingMode.HALF_DOWN); in testDivideRounding() 143 checkDivide("1", Long.MAX_VALUE, Long.MAX_VALUE / 2 + 1, 0, RoundingMode.DOWN); in testDivideRounding() [all …]
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | MultiplicationTests.java | 93 {Long.MAX_VALUE, Long.MAX_VALUE}, in testMultiplyHigh() 94 {Long.MAX_VALUE, -Long.MAX_VALUE}, in testMultiplyHigh() 95 {-Long.MAX_VALUE, Long.MAX_VALUE}, in testMultiplyHigh() 96 {Long.MAX_VALUE, Long.MIN_VALUE}, in testMultiplyHigh() 97 {Long.MIN_VALUE, Long.MAX_VALUE}, in testMultiplyHigh() 98 {Long.MIN_VALUE, Long.MIN_VALUE} in testMultiplyHigh()
|
D | ExactArithTests.java | 160 testLongExactTwice(Long.MIN_VALUE, Long.MIN_VALUE); in testLongExact() 161 testLongExactTwice(Long.MAX_VALUE, Long.MAX_VALUE); in testLongExact() 162 testLongExactTwice(Long.MIN_VALUE, 1); in testLongExact() 163 testLongExactTwice(Long.MAX_VALUE, 1); in testLongExact() 164 testLongExactTwice(Long.MIN_VALUE, 2); in testLongExact() 165 testLongExactTwice(Long.MAX_VALUE, 2); in testLongExact() 166 testLongExactTwice(Long.MIN_VALUE, -1); in testLongExact() 167 testLongExactTwice(Long.MAX_VALUE, -1); in testLongExact() 168 testLongExactTwice(Long.MIN_VALUE, -2); in testLongExact() 169 testLongExactTwice(Long.MAX_VALUE, -2); in testLongExact() [all …]
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | LongPipeline.java | 57 extends AbstractPipeline<E_IN, Long, LongStream> 68 LongPipeline(Supplier<? extends Spliterator<Long>> source, in LongPipeline() 81 LongPipeline(Spliterator<Long> source, in LongPipeline() 100 private static LongConsumer adapt(Sink<Long> sink) { in adapt() 118 private static Spliterator.OfLong adapt(Spliterator<Long> s) { in adapt() 140 public final <P_IN> Node<Long> evaluateToNode(PipelineHelper<Long> helper, in evaluateToNode() 143 IntFunction<Long[]> generator) { in evaluateToNode() 149 public final <P_IN> Spliterator<Long> wrap(PipelineHelper<Long> ph, in wrap() 158 … public final Spliterator.OfLong lazySpliterator(Supplier<? extends Spliterator<Long>> supplier) { in lazySpliterator() 164 public final void forEachWithCancel(Spliterator<Long> spliterator, Sink<Long> sink) { in forEachWithCancel() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | RangeTest.java | 192 long[] inc = LongStream.rangeClosed(Long.MAX_VALUE - 1, Long.MAX_VALUE).toArray(); in testLongRange() 194 assertEquals(Long.MAX_VALUE - 1, inc[0]); in testLongRange() 195 assertEquals(Long.MAX_VALUE, inc[1]); in testLongRange() 197 inc = LongStream.rangeClosed(Long.MAX_VALUE, Long.MAX_VALUE).toArray(); in testLongRange() 199 assertEquals(Long.MAX_VALUE, inc[0]); in testLongRange() 202 () -> LongStream.rangeClosed(Long.MAX_VALUE - 8, Long.MAX_VALUE).spliterator()); in testLongRange() 216 terminal(s -> s.reduce(0, Long::sum)).exercise(); in testLongRangeReduce() 222 terminal(s -> s.reduce(0, Long::sum)).exercise(); in testLongInfiniteRangeLimit() 244 Spliterator.OfLong s = LongStream.range(Long.MIN_VALUE, Long.MAX_VALUE).spliterator(); in testLongLongRange() 246 assertEquals(s.estimateSize(), Long.MAX_VALUE); in testLongLongRange() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Long.java | 55 public final class Long extends Number implements Comparable<Long> { class 75 public static final Class<Long> TYPE = (Class<Long>) Class.getPrimitiveClass("long"); 355 int mag = Long.SIZE - Long.numberOfLeadingZeros(val); in toUnsignedString0() 397 if (i == Long.MIN_VALUE) in toString() 572 long limit = -Long.MAX_VALUE; in parseLong() 581 limit = Long.MIN_VALUE; in parseLong() 780 public static Long valueOf(String s, int radix) throws NumberFormatException { in valueOf() 781 return Long.valueOf(parseLong(s, radix)); in valueOf() 806 public static Long valueOf(String s) throws NumberFormatException in valueOf() 808 return Long.valueOf(parseLong(s, 10)); in valueOf() [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/lang/ |
D | Long.java | 33 public final class Long extends java.lang.Number implements java.lang.Comparable<java.lang.Long> { class 35 public Long(long value) { in Long() method in Long 39 public Long(java.lang.String s) throws java.lang.NumberFormatException { in Long() method in Long 110 public static java.lang.Long valueOf(java.lang.String s, int radix) in valueOf() 115 public static java.lang.Long valueOf(java.lang.String s) in valueOf() 120 public static java.lang.Long valueOf(long l) { in valueOf() 124 public static java.lang.Long decode(java.lang.String nm) in decode() 169 public static java.lang.Long getLong(java.lang.String nm) { in getLong() 173 public static java.lang.Long getLong(java.lang.String nm, long val) { in getLong() 177 public static java.lang.Long getLong(java.lang.String nm, java.lang.Long val) { in getLong() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | NumberFormatTest.java | 42 out = format.format(new Long(Long.MAX_VALUE), new StringBuffer(), pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 47 out = format.format(new Long(Long.MIN_VALUE), new StringBuffer(), pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 53 .valueOf(Long.MAX_VALUE)), new StringBuffer(), pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 59 .valueOf(Long.MIN_VALUE)), new StringBuffer(), pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 65 big = new java.math.BigInteger(String.valueOf(Long.MAX_VALUE)) in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 72 big = new java.math.BigInteger(String.valueOf(Long.MIN_VALUE)) in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 103 format.format(new Long(0), null, pos); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 110 format.format(new Long(0), new StringBuffer(), null); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 136 new Long(35), format.parse("35.76")); in test_getIntegerInstance() 139 new Long(35), format.parseObject("35.76")); in test_getIntegerInstance() [all …]
|
/libcore/ojluni/annotations/sdk/nullability/java/lang/ |
D | Long.annotated.java | 33 public final class Long extends java.lang.Number implements java.lang.Comparable<java.lang.Long> { class 35 public Long(long value) { throw new RuntimeException("Stub!"); } in Long() method in Long 37 public Long(@libcore.util.NonNull java.lang.String s) throws java.lang.NumberFormatException { thro… in Long() method in Long 61 @libcore.util.NonNull public static java.lang.Long valueOf(@libcore.util.NonNull java.lang.String s… in valueOf() 63 @libcore.util.NonNull public static java.lang.Long valueOf(@libcore.util.NonNull java.lang.String s… in valueOf() 65 @libcore.util.NonNull public static java.lang.Long valueOf(long l) { throw new RuntimeException("St… in valueOf() 67 @libcore.util.NonNull public static java.lang.Long decode(@libcore.util.NonNull java.lang.String nm… in decode() 89 @libcore.util.Nullable public static java.lang.Long getLong(@libcore.util.NonNull java.lang.String … in getLong() 91 @libcore.util.Nullable public static java.lang.Long getLong(@libcore.util.NonNull java.lang.String … in getLong() 93 …lable public static java.lang.Long getLong(@libcore.util.NonNull java.lang.String nm, @libcore.uti… in getLong() [all …]
|
/libcore/ojluni/src/test/java/time/jdk/testlibrary/ |
D | RandomFactory.java | 40 private static Long getSystemSeed() { in getSystemSeed() 41 Long seed = null; in getSystemSeed() 46 seed = Long.valueOf(System.getProperty("seed")); in getSystemSeed() 72 Long seed = getSystemSeed(); in getSeed()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeTextProvider.java | 110 …private static final Comparator<Entry<String, Long>> COMPARATOR = new Comparator<Entry<String, Lon… 112 public int compare(Entry<String, Long> obj1, Entry<String, Long> obj2) { 220 …public Iterator<Entry<String, Long>> getTextIterator(TemporalField field, TextStyle style, Locale … in getTextIterator() 245 public Iterator<Entry<String, Long>> getTextIterator(Chronology chrono, TemporalField field, in getTextIterator() 276 List<Entry<String, Long>> list = new ArrayList<>(map.size()); in getTextIterator() 330 Map<TextStyle, Map<Long, String>> styleMap = new HashMap<>(); in createStore() 340 Map<Long, String> map = new HashMap<>(); in createStore() 356 Map<Long, String> map = new HashMap<>(); in createStore() 386 Map<Long, String> map = new HashMap<>(); in createStore() 421 Map<Long, String> map = new HashMap<>(); in createStore() [all …]
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 147 if (secs == Long.MIN_VALUE || secs == Long.MAX_VALUE) { in to() 154 return (secs < 0) ? Long.MIN_VALUE : Long.MAX_VALUE; in to() 180 return (secs < 0) ? Long.MIN_VALUE : Long.MAX_VALUE; in toMillis() 209 if (d > over) return Long.MAX_VALUE; in scale() 210 if (d < -over) return Long.MIN_VALUE; in scale() 237 Long.MAX_VALUE/SECONDS_PER_DAY); in toInstant() 241 Long.MAX_VALUE/SECONDS_PER_HOUR); in toInstant() 245 Long.MAX_VALUE/SECONDS_PER_MINUTE); in toInstant() 340 return Long.compare(value, other.value); in compareTo() 345 int cmp = Long.compare(secs, secsOther); in compareTo() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestInstant.java | 82 {"Long.MAX_VALUE", Long.MAX_VALUE}, in provider_sampleEpochMillis() 83 {"Long.MAX_VALUE-1", Long.MAX_VALUE - 1}, in provider_sampleEpochMillis() 87 {"Long.MIN_VALUE+1", Long.MIN_VALUE + 1}, in provider_sampleEpochMillis() 88 {"Long.MIN_VALUE", Long.MIN_VALUE} in provider_sampleEpochMillis()
|
/libcore/luni/src/test/java/libcore/android/system/ |
D | StructTimevalTest.java | 57 { Long.MAX_VALUE, /* 9223372036854775807 */ in interestingMillisValues() 58 Long.MAX_VALUE / MS_PER_SEC, /* 9223372036854775 */ in interestingMillisValues() 59 (Long.MAX_VALUE % MS_PER_SEC) * US_PER_MS, /* 807000 */ in interestingMillisValues() 63 { Long.MIN_VALUE, /* -9223372036854775808 */ in interestingMillisValues() 64 (Long.MIN_VALUE / MS_PER_SEC) - 1L, /* -9223372036854776 */ in interestingMillisValues() 65 US_PER_SEC - (-(Long.MIN_VALUE % MS_PER_SEC) * US_PER_MS), /* 192000 */ in interestingMillisValues()
|