Lines Matching refs:Integer
468 Assert.assertEquals(Math.abs(Integer.MAX_VALUE), Integer.MAX_VALUE);
469 Assert.assertEquals(Math.abs(Integer.MIN_VALUE), Integer.MIN_VALUE);
470 Assert.assertEquals(Math.abs(Integer.MIN_VALUE - 1), Integer.MAX_VALUE);
471 Assert.assertEquals(Math.abs(Integer.MIN_VALUE + 1), Integer.MAX_VALUE);
490 Assert.assertEquals(Math.min(0, Integer.MAX_VALUE), 0);
491 Assert.assertEquals(Math.min(Integer.MIN_VALUE, 0), Integer.MIN_VALUE);
492 Assert.assertEquals(Math.min(Integer.MIN_VALUE, Integer.MAX_VALUE), Integer.MIN_VALUE);
500 Assert.assertEquals(Math.max(0, Integer.MAX_VALUE), Integer.MAX_VALUE);
501 Assert.assertEquals(Math.max(Integer.MIN_VALUE, 0), 0);
502 Assert.assertEquals(Math.max(Integer.MIN_VALUE, Integer.MAX_VALUE), Integer.MAX_VALUE);
869 Assert.assertEquals(Math.round(Integer.MAX_VALUE + 1.0f), Integer.MAX_VALUE);
870 Assert.assertEquals(Math.round(Integer.MIN_VALUE - 1.0f), Integer.MIN_VALUE);
872 Integer.MAX_VALUE); // 2^32
874 Integer.MIN_VALUE); // -2^32
875 Assert.assertEquals(Math.round(Float.POSITIVE_INFINITY), Integer.MAX_VALUE);
876 Assert.assertEquals(Math.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE);
984 Assert.assertEquals(StrictMath.abs(Integer.MAX_VALUE), Integer.MAX_VALUE);
985 Assert.assertEquals(StrictMath.abs(Integer.MIN_VALUE), Integer.MIN_VALUE);
986 Assert.assertEquals(StrictMath.abs(Integer.MIN_VALUE - 1), Integer.MAX_VALUE);
987 Assert.assertEquals(StrictMath.abs(Integer.MIN_VALUE + 1), Integer.MAX_VALUE);
1005 Assert.assertEquals(StrictMath.min(0, Integer.MAX_VALUE), 0);
1006 Assert.assertEquals(StrictMath.min(Integer.MIN_VALUE, 0), Integer.MIN_VALUE);
1007 Assert.assertEquals(StrictMath.min(Integer.MIN_VALUE, Integer.MAX_VALUE), Integer.MIN_VALUE);
1015 Assert.assertEquals(StrictMath.max(0, Integer.MAX_VALUE), Integer.MAX_VALUE);
1016 Assert.assertEquals(StrictMath.max(Integer.MIN_VALUE, 0), 0);
1017 Assert.assertEquals(StrictMath.max(Integer.MIN_VALUE, Integer.MAX_VALUE), Integer.MAX_VALUE);
1228 Assert.assertEquals(StrictMath.round(Integer.MAX_VALUE + 1.0f), Integer.MAX_VALUE);
1229 Assert.assertEquals(StrictMath.round(Integer.MIN_VALUE - 1.0f), Integer.MIN_VALUE);
1231 Integer.MAX_VALUE); // 2^32
1233 Integer.MIN_VALUE); // -2^32
1234 Assert.assertEquals(StrictMath.round(Float.POSITIVE_INFINITY), Integer.MAX_VALUE);
1235 Assert.assertEquals(StrictMath.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE);
1291 Integer.reverseBytes(0x13579bdf);
1292 Assert.assertEquals(Integer.reverseBytes(0x00000000), 0x00000000);
1293 Assert.assertEquals(Integer.reverseBytes(0xffffffff), 0xffffffff);
1294 Assert.assertEquals(Integer.reverseBytes(0x80000000), 0x00000080);
1295 Assert.assertEquals(Integer.reverseBytes(0x00000080), 0x80000000);
1296 Assert.assertEquals(Integer.reverseBytes(0x01234567), 0x67452301);
1297 Assert.assertEquals(Integer.reverseBytes(0x89abcdef), 0xefcdab89);
1310 Integer.reverse(0x12345678);
1311 Assert.assertEquals(Integer.reverse(1), 0x80000000);
1312 Assert.assertEquals(Integer.reverse(-1), 0xffffffff);
1313 Assert.assertEquals(Integer.reverse(0), 0);
1314 Assert.assertEquals(Integer.reverse(0x12345678), 0x1e6a2c48);
1315 Assert.assertEquals(Integer.reverse(0x87654321), 0x84c2a6e1);
1316 Assert.assertEquals(Integer.reverse(Integer.MAX_VALUE), 0xfffffffe);
1317 Assert.assertEquals(Integer.reverse(Integer.MIN_VALUE), 1);
1380 Assert.assertEquals(Integer.numberOfLeadingZeros(0), Integer.SIZE);
1381 Assert.assertEquals(Integer.numberOfLeadingZeros(1), Integer.SIZE - 1);
1382 Assert.assertEquals(Integer.numberOfLeadingZeros(1 << (Integer.SIZE-1)), 0);
1383 Assert.assertEquals(Integer.numberOfLeadingZeros($noinline$return_int_zero()), Integer.SIZE);
1384 for (int i = 0; i < Integer.SIZE; i++) {
1385 Assert.assertEquals(Integer.numberOfLeadingZeros(1 << i), Integer.SIZE - 1 - i);
1386 Assert.assertEquals(Integer.numberOfLeadingZeros((1 << i) | 1), Integer.SIZE - 1 - i);
1387 Assert.assertEquals(Integer.numberOfLeadingZeros(0xFFFFFFFF >>> i), i);
1428 …new_non_movable_array = vm_runtime.getDeclaredMethod("newNonMovableArray", Class.class, Integer.TY…
1437 poke_int = io_memory.getDeclaredMethod("pokeInt", Long.TYPE, Integer.TYPE, Boolean.TYPE);
1545 Assert.assertEquals(Integer.numberOfTrailingZeros(0), Integer.SIZE);
1546 for (int i = 0; i < Integer.SIZE; i++) {
1548 Integer.numberOfTrailingZeros(0x80000000 >> i),
1549 Integer.SIZE - 1 - i);
1551 Integer.numberOfTrailingZeros((0x80000000 >> i) | 0x80000000),
1552 Integer.SIZE - 1 - i);
1553 Assert.assertEquals(Integer.numberOfTrailingZeros(1 << i), i);
1571 Assert.assertEquals(Integer.rotateRight(0x11, 0), 0x11);
1573 Assert.assertEquals(Integer.rotateRight(0x11, 1), 0x80000008);
1574 Assert.assertEquals(Integer.rotateRight(0x11, Integer.SIZE - 1), 0x22);
1575 Assert.assertEquals(Integer.rotateRight(0x11, Integer.SIZE), 0x11);
1576 Assert.assertEquals(Integer.rotateRight(0x11, Integer.SIZE + 1), 0x80000008);
1578 Assert.assertEquals(Integer.rotateRight(0x11, -1), 0x22);
1579 Assert.assertEquals(Integer.rotateRight(0x11, -(Integer.SIZE - 1)), 0x80000008);
1580 Assert.assertEquals(Integer.rotateRight(0x11, -Integer.SIZE), 0x11);
1581 Assert.assertEquals(Integer.rotateRight(0x11, -(Integer.SIZE + 1)), 0x22);
1583 Assert.assertEquals(Integer.rotateRight(0x80000000, 1), 0x40000000);
1585 for (int i = 0; i < Integer.SIZE; i++) {
1587 Integer.rotateRight(0xBBAAAADD, i),
1588 (0xBBAAAADD >>> i) | (0xBBAAAADD << (Integer.SIZE - i)));
1615 Assert.assertEquals(Integer.rotateLeft(0x11, 0), 0x11);
1617 Assert.assertEquals(Integer.rotateLeft(0x11, 1), 0x22);
1618 Assert.assertEquals(Integer.rotateLeft(0x11, Integer.SIZE - 1), 0x80000008);
1619 Assert.assertEquals(Integer.rotateLeft(0x11, Integer.SIZE), 0x11);
1620 Assert.assertEquals(Integer.rotateLeft(0x11, Integer.SIZE + 1), 0x22);
1622 Assert.assertEquals(Integer.rotateLeft(0x11, -1), 0x80000008);
1623 Assert.assertEquals(Integer.rotateLeft(0x11, -(Integer.SIZE - 1)), 0x22);
1624 Assert.assertEquals(Integer.rotateLeft(0x11, -Integer.SIZE), 0x11);
1625 Assert.assertEquals(Integer.rotateLeft(0x11, -(Integer.SIZE + 1)), 0x80000008);
1627 Assert.assertEquals(Integer.rotateLeft(0xC0000000, 1), 0x80000001);
1629 for (int i = 0; i < Integer.SIZE; i++) {
1631 Integer.rotateLeft(0xBBAAAADD, i),
1632 (0xBBAAAADD << i) | (0xBBAAAADD >>> (Integer.SIZE - i)));
1659 for (int i = 0; i < Integer.SIZE * 2; i++) {
1660 Assert.assertEquals(Integer.rotateLeft(0xBBAAAADD, i),
1661 Integer.rotateRight(0xBBAAAADD, -i));
1662 Assert.assertEquals(Integer.rotateLeft(0xBBAAAADD, -i),
1663 Integer.rotateRight(0xBBAAAADD, i));