/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ShortTest.java | 22 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/ |
D | ShortTest.java | 21 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/ |
D | Short.java | 43 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/ |
D | Short.java | 32 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/ |
D | ExplicitCastArgumentsTest.java | 48 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 …]
|
D | MethodHandleAccessorsTest.java | 59 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 …]
|
D | MethodHandleCombinersTest.java | 1023 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/ |
D | JniTest.java | 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() 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/ |
D | DirectShortBufferTest.java | 26 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/ |
D | FieldTest.java | 97 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 …]
|
D | MethodTest.java | 716 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/ |
D | NioBufferIterator.java | 118 checkReadBounds(position, length, Short.BYTES); in readShort() 120 position += Short.BYTES; in readShort()
|
D | Memory.java | 192 result = Short.reverseBytes(result); in peekShort() 234 value = Short.reverseBytes(value); in pokeShort()
|
/libcore/ojluni/src/main/java/java/io/ |
D | ObjectStreamField.java | 115 case 'S': type = Short.TYPE; break; in ObjectStreamField() 314 } else if (cl == Short.TYPE) { in getClassSignature()
|
/libcore/luni/src/test/java/libcore/libcore/io/ |
D | MemoryTest.java | 113 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/ |
D | Array.java | 193 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/ |
D | Wrapper.java | 33 …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/ |
D | OldRandomAccessFileTest.java | 680 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()
|
D | OldDataInputStreamTest.java | 308 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/ |
D | DirectByteBuffer.java | 460 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()
|
D | ShortBuffer.java | 843 return Short.compare(x, y); in compare()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | RandomAccessFileTest.java | 401 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/ |
D | OldPreparedStatementTest.java | 1073 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/ |
D | IdentityHashMap2Test.java | 316 Short s0 = new Short((short) 0); in test_putLjava_lang_ObjectLjava_lang_Object()
|
/libcore/luni/src/main/native/ |
D | libcore_io_Memory.cpp | 157 PEEKER(jshort, Short, jshort, swapShorts); in Memory_peekShortArray() 209 POKER(jshort, Short, jshort, swapShorts); in Memory_pokeShortArray()
|