Home
last modified time | relevance | path

Searched refs:Short (Results 1 – 25 of 54) sorted by relevance

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DShortTest.java22 private Short sp = new Short((short) 18000);
23 private Short sn = new Short((short) -19000);
30 assertEquals("Returned incorrect byte value", 0, new Short(Short.MIN_VALUE) in test_byteValue()
32 assertEquals("Returned incorrect byte value", -1, new Short(Short.MAX_VALUE) in test_byteValue()
41 Short s = new Short((short) 1); in test_compareToLjava_lang_Short()
42 Short x = new Short((short) 3); in test_compareToLjava_lang_Short()
46 x = new Short((short) -1); in test_compareToLjava_lang_Short()
50 x = new Short((short) 1); in test_compareToLjava_lang_Short()
55 new Short((short) 0).compareTo(null); in test_compareToLjava_lang_Short()
67 assertTrue("Did not decode -1 correctly", Short.decode("-1") in test_decodeLjava_lang_String2()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DShortTest.java21 final short min = Short.MIN_VALUE; in test_compare()
23 final short max = Short.MAX_VALUE; in test_compare()
24 assertTrue(Short.compare(max, max) == 0); in test_compare()
25 assertTrue(Short.compare(min, min) == 0); in test_compare()
26 assertTrue(Short.compare(zero, zero) == 0); in test_compare()
27 assertTrue(Short.compare(max, zero) > 0); in test_compare()
28 assertTrue(Short.compare(max, min) > 0); in test_compare()
29 assertTrue(Short.compare(zero, max) < 0); in test_compare()
30 assertTrue(Short.compare(zero, min) > 0); in test_compare()
31 assertTrue(Short.compare(min, zero) < 0); in test_compare()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DShort.java43 public final class Short extends Number implements Comparable<Short> { class
62 public static final Class<Short> TYPE = (Class<Short>) Class.getPrimitiveClass("short");
172 public static Short valueOf(String s, int radix) in valueOf()
199 public static Short valueOf(String s) throws NumberFormatException { in valueOf()
206 static final Short cache[] = new Short[-(-128) + 127 + 1];
210 cache[i] = new Short((short)(i - 128));
230 public static Short valueOf(short s) { in valueOf()
236 return new Short(s); in valueOf()
281 public static Short decode(String nm) throws NumberFormatException { in decode()
303 public Short(short value) { in Short() method in Short
[all …]
/libcore/ojluni/annotations/hiddenapi/java/lang/
DShort.java32 public final class Short extends java.lang.Number implements java.lang.Comparable<java.lang.Short> { class
34 public Short(short value) { in Short() method in Short
38 public Short(java.lang.String s) throws java.lang.NumberFormatException { in Short() method in Short
55 public static java.lang.Short valueOf(java.lang.String s, int radix) in valueOf()
60 public static java.lang.Short valueOf(java.lang.String s) in valueOf()
65 public static java.lang.Short valueOf(short s) { in valueOf()
69 public static java.lang.Short decode(java.lang.String nm) in decode()
114 public int compareTo(java.lang.Short anotherShort) { in compareTo()
142 public static final java.lang.Class<java.lang.Short> TYPE;
167 static final java.lang.Short[] cache;
[all …]
/libcore/luni/src/test/java/libcore/java/lang/invoke/
DExplicitCastArgumentsTest.java48 private static final Short[] SHORT_VALUES = new Short[]{
49 Short.valueOf((short) 0), Short.valueOf((short) 1), Short.valueOf((short) 130),
50 Short.valueOf((short) -1), Short.valueOf((short) -130), Short.MIN_VALUE, Short.MAX_VALUE
360 MethodHandle mh = explicitCastArgumentToIdentity(Short.class, boolean.class); in explicitCastArgumentZToShort()
362 Short o = (Short) mh.invokeExact(BOOLEAN_VALUES[0].booleanValue()); in explicitCastArgumentZToShort()
495 MethodHandle mh = explicitCastArgumentToIdentity(Short.class, byte.class); in explicitCastArgumentBToShort()
497 Short o = (Short) mh.invokeExact(BYTE_VALUES[0].byteValue()); in explicitCastArgumentBToShort()
630 MethodHandle mh = explicitCastArgumentToIdentity(Short.class, char.class); in explicitCastArgumentCToShort()
632 Short o = (Short) mh.invokeExact(CHARACTER_VALUES[0].charValue()); in explicitCastArgumentCToShort()
766 MethodHandle mh = explicitCastArgumentToIdentity(Short.class, short.class); in explicitCastArgumentSToShort()
[all …]
DMethodHandleAccessorsTest.java59 Short, enumConstant
475 short shortValue = value instanceof Short ? ((Short)value).shortValue() : (short)0; in tryAccessor()
477 resultFor(primitive, PrimitiveType.Short, accessor, AccessorType.IPUT)); in tryAccessor()
479 resultFor(primitive, PrimitiveType.Short, accessor, AccessorType.SPUT)); in tryAccessor()
481 resultFor(primitive, PrimitiveType.Short, accessor, AccessorType.IGET)); in tryAccessor()
483 resultFor(primitive, PrimitiveType.Short, accessor, AccessorType.SGET)); in tryAccessor()
602 Short boxed = new Short(s); in testShortSettersAndGetters()
604 valueHolder, PrimitiveType.Short, boxed, AccessorType.IPUT); in testShortSettersAndGetters()
606 valueHolder, PrimitiveType.Short, boxed, AccessorType.IGET); in testShortSettersAndGetters()
609 valueHolder, PrimitiveType.Short, boxed, AccessorType.SPUT); in testShortSettersAndGetters()
[all …]
DMethodHandleCombinersTest.java1023 public static int spreadShort(String a, Short b, short c, in spreadShort()
1026 assertEquals(Short.valueOf((short) 1), b); in spreadShort()
1140 String.class, Short.class, short.class, in testSpreaders_primitive()
2040 Short s, Integer i, Long j, Float f, Double d) { in checkBoxingCasts_delegate()
2045 assertEquals(Short.valueOf((short) v), s); in checkBoxingCasts_delegate()
2095 Short.valueOf((short) 0x5a5a)); in testExplicitCastArguments()
2128 float.class, double.class, Short.class)); in testExplicitCastArguments()
2131 Short.valueOf((short) 0x3773)); in testExplicitCastArguments()
2227 Character.class, Short.class, Integer.class, Long.class, in testExplicitCastArguments()
2236 Character.valueOf((char) 0), Short.valueOf((short) 0), Integer.valueOf(0), in testExplicitCastArguments()
[all …]
/libcore/luni/src/test/java/libcore/dalvik/system/
DJniTest.java209 …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()
266 final long[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingLongs()
295 final float[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingFloats()
326 final double[] literals = {Byte.MAX_VALUE, Byte.MIN_VALUE, Short.MAX_VALUE, Short.MIN_VALUE, in testPassingDoubles()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DDirectShortBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Short.BYTES).asShortBuffer(); in setUp()
68 assertEquals(shortBufferBasePointer + Short.BYTES, NIOAccess.getBasePointer(shortBuffer)); in testJNIAccessByAddress()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DFieldTest.java97 protected short shortField = Short.MAX_VALUE;
98 protected final short shortFField = Short.MAX_VALUE;
99 protected static short shortSField = Short.MAX_VALUE;
100 private final short shortPFField = Short.MAX_VALUE;
148 protected short shortField = Short.MAX_VALUE;
257 res = new Short(f.getShort(o)); in getField()
304 f.setShort(o, ((Short) value).shortValue()); in setField()
433 new Short((short) 1), new Character((char) 1), new Integer(1), in testProtectedFieldAccess()
1006 val == Short.MAX_VALUE); in test_getShortLjava_lang_Object()
1039 assertEquals("Wrong value returned", Short.MAX_VALUE, staticValue); in test_getShortLjava_lang_Object()
[all …]
DMethodTest.java716 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
729 methods[i].invoke(testMethod, new Object[] { new Short( in test_invokeLjava_lang_Object$Ljava_lang_Object()
732 param == Short.TYPE || param == Integer.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
755 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
769 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
787 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
800 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
816 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
833 param == Byte.TYPE || param == Short.TYPE in test_invokeLjava_lang_Object$Ljava_lang_Object()
/libcore/luni/src/main/java/libcore/io/
DNioBufferIterator.java118 checkReadBounds(position, length, Short.BYTES); in readShort()
120 position += Short.BYTES; in readShort()
DMemory.java192 result = Short.reverseBytes(result); in peekShort()
234 value = Short.reverseBytes(value); in pokeShort()
/libcore/ojluni/src/main/java/java/io/
DObjectStreamField.java115 case 'S': type = Short.TYPE; break; in ObjectStreamField()
314 } else if (cl == Short.TYPE) { in getClassSignature()
/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryTest.java113 int scale = Short.BYTES; in testSetShortArray()
143 assertEquals(expectedValues[i], Memory.peekShort(ptr + Short.BYTES * i, swap)); in assertShortsEqual()
/libcore/ojluni/src/main/java/java/lang/reflect/
DArray.java193 return Short.valueOf(((short[]) array)[index]); in get()
490 } else if (value instanceof Short) { in set()
491 setShort(array, index, ((Short) value).shortValue()); in set()
/libcore/ojluni/src/main/java/sun/invoke/util/
DWrapper.java33 …SHORT ( Short.class, short.class, 'S', (Short)(short)0, new short[0], Format.signed( …
526 case 'S': return Short.valueOf((short) xn.intValue()); in wrap()
549 case 'S': return Short.valueOf((short) x); in wrap()
/libcore/luni/src/test/java/libcore/java/io/
DOldRandomAccessFileTest.java680 raf.writeShort(Short.MIN_VALUE); in test_read_writeShort()
682 raf.writeShort(Short.MAX_VALUE); in test_read_writeShort()
683 raf.writeShort(Short.MIN_VALUE - 1); in test_read_writeShort()
684 raf.writeShort(Short.MAX_VALUE + 1); in test_read_writeShort()
688 Short.MIN_VALUE, raf.readShort()); in test_read_writeShort()
692 Short.MAX_VALUE, raf.readShort()); in test_read_writeShort()
DOldDataInputStreamTest.java308 os.writeShort(Short.MIN_VALUE); in test_readUnsignedShort()
312 (Short.MAX_VALUE + 1), dis.readUnsignedShort()); in test_readUnsignedShort()
/libcore/ojluni/src/main/java/java/nio/
DDirectByteBuffer.java460 return getShort(ix(nextGetIndex(Short.BYTES))); in getShort()
468 return getShort(ix(checkIndex(i, Short.BYTES))); in getShort()
501 putShort(ix(nextPutIndex(Short.BYTES)), x); in putShort()
513 putShort(ix(checkIndex(i, Short.BYTES)), x); in putShort()
DShortBuffer.java843 return Short.compare(x, y); in compare()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DRandomAccessFileTest.java401 raf.writeShort(Short.MIN_VALUE); in test_readShort()
403 assertEquals("Incorrect long read/written", Short.MIN_VALUE, raf in test_readShort()
815 raf.writeShort(Short.MIN_VALUE); in test_writeShortI()
817 assertEquals("Incorrect long read/written", Short.MIN_VALUE, raf in test_writeShortI()
/libcore/luni/src/test/java/libcore/java/sql/
DOldPreparedStatementTest.java1073 ps.setShort(1, Short.MAX_VALUE); in testSetShort()
1076 st.execute("select * from type where Sint=" + Short.MAX_VALUE); in testSetShort()
1087 ps.setShort(1, Short.MIN_VALUE); in testSetShort()
1090 st.execute("select * from type where Sint=" + Short.MIN_VALUE); in testSetShort()
1103 ps.setShort(1, Short.MIN_VALUE); in testSetShort()
1111 ps1.setShort(1, Short.MAX_VALUE); in testSetShort()
1115 ps2.setShort(1, Short.MAX_VALUE); in testSetShort()
1118 st.execute("select * from type where IntVal=" + Short.MAX_VALUE); in testSetShort()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DIdentityHashMap2Test.java316 Short s0 = new Short((short) 0); in test_putLjava_lang_ObjectLjava_lang_Object()
/libcore/luni/src/main/native/
Dlibcore_io_Memory.cpp157 PEEKER(jshort, Short, jshort, swapShorts); in Memory_peekShortArray()
209 POKER(jshort, Short, jshort, swapShorts); in Memory_pokeShortArray()

123