Home
last modified time | relevance | path

Searched refs:MAX_VALUE (Results 1 – 25 of 340) sorted by relevance

12345678910>>...14

/libcore/ojluni/src/test/java/lang/StrictMath/
DExactArithTests.java79 testIntegerExact(Integer.MAX_VALUE, Integer.MAX_VALUE); in testIntegerExact()
81 testIntegerExact(Integer.MAX_VALUE, 1); in testIntegerExact()
83 testIntegerExact(Integer.MAX_VALUE, 2); in testIntegerExact()
85 testIntegerExact(Integer.MAX_VALUE, -1); in testIntegerExact()
87 testIntegerExact(Integer.MAX_VALUE, -2); in testIntegerExact()
161 testLongExactTwice(Long.MAX_VALUE, Long.MAX_VALUE); in testLongExact()
163 testLongExactTwice(Long.MAX_VALUE, 1); in testLongExact()
165 testLongExactTwice(Long.MAX_VALUE, 2); in testLongExact()
167 testLongExactTwice(Long.MAX_VALUE, -1); in testLongExact()
169 testLongExactTwice(Long.MAX_VALUE, -2); in testLongExact()
[all …]
DMultiplicationTests.java93 {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()
/libcore/ojluni/src/test/java/lang/Math/
DMultiplicationTests.java53 {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()
DExactArithTests.java55 testIntegerExact(Integer.MAX_VALUE, Integer.MAX_VALUE); in testIntegerExact()
57 testIntegerExact(Integer.MAX_VALUE, 1); in testIntegerExact()
59 testIntegerExact(Integer.MAX_VALUE, 2); in testIntegerExact()
61 testIntegerExact(Integer.MAX_VALUE, -1); in testIntegerExact()
63 testIntegerExact(Integer.MAX_VALUE, -2); in testIntegerExact()
186 testLongExactTwice(Long.MAX_VALUE, Long.MAX_VALUE); in testLongExact()
188 testLongExactTwice(Long.MAX_VALUE, 1); in testLongExact()
190 testLongExactTwice(Long.MAX_VALUE, 2); in testLongExact()
192 testLongExactTwice(Long.MAX_VALUE, -1); in testLongExact()
194 testLongExactTwice(Long.MAX_VALUE, -2); in testLongExact()
[all …]
DDivModTests.java74 testIntFloorDivMod(Integer.MAX_VALUE, 1, Integer.MAX_VALUE, 0); in testIntFloorDivMod()
75 testIntFloorDivMod(Integer.MAX_VALUE, -1, -Integer.MAX_VALUE, 0); in testIntFloorDivMod()
76 testIntFloorDivMod(Integer.MAX_VALUE, 3, 715827882, 1); in testIntFloorDivMod()
77 testIntFloorDivMod(Integer.MAX_VALUE - 1, 3, 715827882, 0); in testIntFloorDivMod()
80 testIntFloorDivMod(Integer.MIN_VALUE + 1, -1, Integer.MAX_VALUE, 0); in testIntFloorDivMod()
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()
169 testLongFloorDivMod(Long.MIN_VALUE + 1, -1, Long.MAX_VALUE, 0L); in testLongFloorDivMod()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DTimeUnitTest.java131 Integer.MAX_VALUE, Integer.MIN_VALUE, in testConvert()
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()
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()
311 NANOSECONDS.convert(-Long.MAX_VALUE / 4, MINUTES)); in testConvertSaturate()
312 assertEquals(Long.MAX_VALUE, in testConvertSaturate()
313 NANOSECONDS.convert(Long.MAX_VALUE / 2, HOURS)); in testConvertSaturate()
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DRangeTest.java102 int[] inc = IntStream.rangeClosed(Integer.MAX_VALUE - 1, Integer.MAX_VALUE).toArray(); in testIntRange()
104 assertEquals(Integer.MAX_VALUE - 1, inc[0]); in testIntRange()
105 assertEquals(Integer.MAX_VALUE, inc[1]); in testIntRange()
107 inc = IntStream.rangeClosed(Integer.MAX_VALUE, Integer.MAX_VALUE).toArray(); in testIntRange()
109 assertEquals(Integer.MAX_VALUE, inc[0]); in testIntRange()
112 … () -> IntStream.rangeClosed(Integer.MAX_VALUE - 8, Integer.MAX_VALUE).spliterator()); in testIntRange()
117 Spliterator.OfInt s = IntStream.rangeClosed(Integer.MIN_VALUE, Integer.MAX_VALUE). in testIntRange()
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()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DStrictMathTest.java29 testIntExact(Integer.MAX_VALUE, 1); in testIntExact()
30 testIntExact(Integer.MAX_VALUE, -1); in testIntExact()
33 testIntExact(Integer.MAX_VALUE, Integer.MAX_VALUE); in testIntExact()
81 testLongExact(Long.MAX_VALUE, 1); in testLongExact()
82 testLongExact(Long.MAX_VALUE, -1); in testLongExact()
85 testLongExact(Long.MAX_VALUE, Long.MAX_VALUE); in testLongExact()
134 if (a <= Integer.MAX_VALUE && a >= Integer.MIN_VALUE) { in testToIntExactL()
145 testFloorDivModI(Integer.MAX_VALUE, 1); in testIntFloorDivMod()
146 testFloorDivModI(Integer.MAX_VALUE, -1); in testIntFloorDivMod()
191 testFloorDivModL(Long.MAX_VALUE, 1L); in testLongFloorDivMod()
[all …]
DMathTest.java29 testIntExact(Integer.MAX_VALUE, 1); in testIntExact()
30 testIntExact(Integer.MAX_VALUE, -1); in testIntExact()
33 testIntExact(Integer.MAX_VALUE, Integer.MAX_VALUE); in testIntExact()
117 testLongExact(Long.MAX_VALUE, 1); in testLongExact()
118 testLongExact(Long.MAX_VALUE, -1); in testLongExact()
121 testLongExact(Long.MAX_VALUE, Long.MAX_VALUE); in testLongExact()
206 if (a <= Integer.MAX_VALUE && a >= Integer.MIN_VALUE) { in testToIntExactL()
217 testFloorDivModI(Integer.MAX_VALUE, 1); in testIntFloorDivMod()
218 testFloorDivModI(Integer.MAX_VALUE, -1); in testIntFloorDivMod()
263 testFloorDivModL(Long.MAX_VALUE, 1L); in testLongFloorDivMod()
[all …]
DOldFloatTest.java33 Float f = new Float(Double.MAX_VALUE); in test_ConstructorD()
64 assertTrue(new Float(Float.MAX_VALUE).hashCode() != new Float(Float.MIN_VALUE).hashCode()); in test_hashCode()
78 assertEquals(Integer.MAX_VALUE, new Float(Float.MAX_VALUE).intValue()); in test_intValue()
84 assertFalse(Float.isNaN(Float.MAX_VALUE)); in test_isNaNF()
89 assertEquals(Long.MAX_VALUE, new Float(Float.MAX_VALUE).longValue()); in test_longValue()
DByteTest.java23 final byte max = Byte.MAX_VALUE; in test_compare()
44 for(int i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; i++) {
53 for(int i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; i++) { in testToUnsignedLong()
88 assertTrue(Byte.compareUnsigned(Byte.MAX_VALUE, (byte)127) == 0); in testCompareUnsigned()
89 assertTrue(Byte.compareUnsigned(Byte.MIN_VALUE, Byte.MAX_VALUE) > 0); in testCompareUnsigned()
91 assertTrue(Byte.compareUnsigned(Byte.MAX_VALUE, z) < 0); in testCompareUnsigned()
DShortTest.java23 final short max = Short.MAX_VALUE; in test_compare()
44 for(int i = Short.MIN_VALUE; i < Short.MAX_VALUE; i++) {
53 for(int i = Short.MIN_VALUE; i < Short.MAX_VALUE; i++) { in testToUnsignedLong()
88 assertTrue(Short.compareUnsigned(Short.MAX_VALUE, (short)32767) == 0); in testCompareUnsigned()
89 assertTrue(Short.compareUnsigned(Short.MIN_VALUE, Short.MAX_VALUE) > 0); in testCompareUnsigned()
91 assertTrue(Short.compareUnsigned(Short.MAX_VALUE, z) < 0); in testCompareUnsigned()
/libcore/luni/src/test/java/libcore/java/text/
DOldParsePositionTest.java23 ParsePosition pp = new ParsePosition(Integer.MAX_VALUE);
31 pp1.setIndex(Integer.MAX_VALUE); in test_hashCode()
40 pp.setErrorIndex(Integer.MAX_VALUE); in test_getErrorIndex()
41 assertEquals("getErrorIndex failed.", Integer.MAX_VALUE, in test_getErrorIndex()
43 assertEquals("getErrorIndex failed.", Integer.MAX_VALUE, in test_getErrorIndex()
DOldNumberFormatTest.java242 String out = nf1.format(Long.MAX_VALUE); in test_formatLlong()
449 nf1.setMaximumFractionDigits(Integer.MAX_VALUE); in test_getMaximumFractionDigits()
452 + " instead of: " + Integer.MAX_VALUE, in test_getMaximumFractionDigits()
453 result == Integer.MAX_VALUE); in test_getMaximumFractionDigits()
460 nf1.setMinimumFractionDigits(Integer.MAX_VALUE); in test_getMaximumFractionDigits()
463 + " instead of Integer.MAX_VALUE", result == Integer.MAX_VALUE); in test_getMaximumFractionDigits()
468 nf1.setMinimumFractionDigits(Integer.MAX_VALUE); in test_getMinimumFractionDigits()
471 + " instead of: " + Integer.MAX_VALUE, in test_getMinimumFractionDigits()
472 result == Integer.MAX_VALUE); in test_getMinimumFractionDigits()
487 nf1.setMaximumIntegerDigits(Integer.MAX_VALUE); in test_getMaximumIntegerDigits()
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DBigDecimalTest.java51 String maxLong = Long.toString(Long.MAX_VALUE); in testGetPrecision()
143 checkDivide("1", Long.MAX_VALUE, Long.MAX_VALUE / 2 + 1, 0, RoundingMode.DOWN); in testDivideRounding()
144 checkDivide("2", Long.MAX_VALUE, Long.MAX_VALUE / 2, 0, RoundingMode.DOWN); in testDivideRounding()
145 checkDivide("0.50", Long.MAX_VALUE / 2, Long.MAX_VALUE, 2, RoundingMode.HALF_UP); in testDivideRounding()
167 checkDivide("0", Long.MAX_VALUE / 2, Long.MAX_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
174 checkDivide("0", -(Long.MAX_VALUE / 2), -Long.MAX_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
181 checkDivide("0", -(Long.MAX_VALUE / 2), Long.MAX_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
188 checkDivide("0", Long.MAX_VALUE / 2, -Long.MAX_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
195 Long.MAX_VALUE, in testDivideByOne()
196 Long.MAX_VALUE - 1, in testDivideByOne()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DFormatterTest.java1419 f.format("%c", Integer.MAX_VALUE); in test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion()
1743 { Long.MAX_VALUE, 'a', "So." }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1749 { Long.MAX_VALUE, 'b', "Aug" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1755 { Long.MAX_VALUE, 'c', "So. Aug 17 15:18:47 GMT+08:00 292278994" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1761 { Long.MAX_VALUE, 'd', "17" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1767 { Long.MAX_VALUE, 'e', "17" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1773 { Long.MAX_VALUE, 'h', "Aug" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1779 { Long.MAX_VALUE, 'j', "229" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1785 { Long.MAX_VALUE, 'k', "15" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1791 { Long.MAX_VALUE, 'l', "3" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java50 assertFromIndexSizeOutOfBounds(/* fromIndex */ Integer.MAX_VALUE - 10, /* size */ 11, in test_checkFromIndexSize_beyondEnd()
51 /* length */ Integer.MAX_VALUE); in test_checkFromIndexSize_beyondEnd()
82 assertFromToIndexOutOfBounds(/* fromIndex */ Integer.MAX_VALUE - 10, in test_checkFromToIndex_beyondEnd()
83 /* toIndex */ Integer.MIN_VALUE, /* length */ Integer.MAX_VALUE); in test_checkFromToIndex_beyondEnd()
100 assertIndexOutOfBounds(Integer.MAX_VALUE, 0); in test_checkIndex_empty()
101 assertIndexOutOfBounds(Integer.MAX_VALUE, 0); in test_checkIndex_empty()
110 assertIndexOutOfBounds(Integer.MAX_VALUE, 1); in test_checkIndex_size1()
111 assertIndexOutOfBounds(Integer.MAX_VALUE, 1); in test_checkIndex_size1()
117 Objects.checkIndex(100, Integer.MAX_VALUE); in test_checkIndex_largeSize()
118 Objects.checkIndex(Integer.MAX_VALUE - 1, Integer.MAX_VALUE); in test_checkIndex_largeSize()
[all …]
/libcore/luni/src/test/java/libcore/dalvik/system/
DJniTest.java150 final char[] literals = {Character.MAX_VALUE, Character.MIN_VALUE, in testPassingChars()
181 final byte[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, 0, -1}; in testPassingBytes()
209 …final short[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, 0, -1}; in testPassingShorts()
237 final int[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingInts()
238 Integer.MAX_VALUE, Integer.MIN_VALUE, 0, -1}; in testPassingInts()
266 final long[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingLongs()
267 … Integer.MAX_VALUE, Integer.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE, 0, -1}; in testPassingLongs()
295 final float[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingFloats()
296 … Integer.MAX_VALUE, Integer.MIN_VALUE, Long.MAX_VALUE, Long.MIN_VALUE, in testPassingFloats()
297 Float.MAX_VALUE, Float.MIN_VALUE, Float.MIN_NORMAL, Float.NaN, in testPassingFloats()
[all …]
/libcore/luni/src/test/java/libcore/libcore/util/
DArrayUtilsTest.java76 throwsIfOutOfBounds(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE); in testThrowsIfOutOfBounds_failsWhenOverflowRangeEndTooHigh()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DWrappedByteBufferTest.java66 ByteBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
72 ByteBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedByteBuffer_IllegalArg()
78 ByteBuffer.wrap((byte[])null, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DParsePositionTest.java63 assertTrue("getIndex failed.", pp.getIndex() == Integer.MAX_VALUE); in test_getIndex()
70 ParsePosition pp2 = new ParsePosition(Integer.MAX_VALUE); in test_hashCode()
109 pp = new ParsePosition(Integer.MAX_VALUE); in setUp()
/libcore/luni/src/test/java/libcore/java/util/prefs/
DOldPreferenceChangeEventTest.java64 pref.putInt("key_int", Integer.MAX_VALUE); in testGetKey()
81 if (pce != null && pce.getNewValue().equals(Integer.toString(Integer.MAX_VALUE))) { in testGetNewValue()
89 pref.putInt("key_int", Integer.MAX_VALUE); in testGetNewValue()
94 pref.putInt("key_int", Integer.MAX_VALUE); in testGetNewValue()
119 pref.putInt("key_int", Integer.MAX_VALUE); in testGetNode()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKPeriod.java100 assertPeriod(Period.ofYears(Integer.MAX_VALUE), Integer.MAX_VALUE, 0, 0); in factory_ofYears_int()
113 assertPeriod(Period.ofMonths(Integer.MAX_VALUE), 0, Integer.MAX_VALUE, 0); in factory_ofMonths_int()
126 assertPeriod(Period.ofWeeks(Integer.MAX_VALUE / 7), 0, 0, (Integer.MAX_VALUE / 7) * 7); in factory_ofWeeks_int()
139 assertPeriod(Period.ofDays(Integer.MAX_VALUE), 0, 0, Integer.MAX_VALUE); in factory_ofDays_int()
199 return ((long) (Integer.MAX_VALUE)) + 1; in factory_from_TemporalAmount_Years_tooBig()
279 {"P" + Integer.MAX_VALUE + "Y", Period.ofYears(Integer.MAX_VALUE)}, in data_factory_parseSuccess()
293 {"P" + Integer.MAX_VALUE + "M", Period.ofMonths(Integer.MAX_VALUE)}, in data_factory_parseSuccess()
319 {"P" + Integer.MAX_VALUE + "D", Period.ofDays(Integer.MAX_VALUE)}, in data_factory_parseSuccess()
409 {"P"+ (((long) Integer.MAX_VALUE) + 1) + "Y"}, in data_parseFailure()
410 {"P"+ (((long) Integer.MAX_VALUE) + 1) + "M"}, in data_parseFailure()
[all …]
/libcore/luni/src/test/java/libcore/java/time/chrono/
DIsoChronologyTest.java51 { Year.MAX_VALUE, 365, Year.MAX_VALUE, 12, 31 }, in test_dateYear()
70 { Year.MAX_VALUE + 1, 1 }, in test_dateYear_invalidValues()
72 { Integer.MAX_VALUE, 1 }, in test_dateYear_invalidValues()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DMathTest.java132 assertEquals(5.643803094122362E102, Math.cbrt(Double.MAX_VALUE), 0D); in test_cbrt_D()
156 Double.POSITIVE_INFINITY, Double.MAX_VALUE, 3.4E302, 2.3,
159 -Double.MIN_NORMAL, -4.5, -3.4E102, -Double.MAX_VALUE,
228 Float.POSITIVE_INFINITY, Float.MAX_VALUE, 3.4E12f, 2.3f,
231 -Float.MIN_NORMAL, -4.5f, -5.6442E21f, -Float.MAX_VALUE,
329 Double.POSITIVE_INFINITY, Math.cosh(Double.MAX_VALUE), 0D); in test_cosh_D()
370 Double.POSITIVE_INFINITY, Math.expm1(Double.MAX_VALUE), 0D); in test_expm1_D()
408 Double.MAX_VALUE, -Double.MAX_VALUE, 2.342E231, -2.342E231, 2800.0,
453 Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.MAX_VALUE,
454 -Float.MAX_VALUE, 3.4256E23f, -3.4256E23f, 2800.0f, -2800.0f,
[all …]

12345678910>>...14