1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Fri Feb 01 06:09:18 2013 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Fri Feb 01 09:00:30 2013 +0100
1.3 @@ -151,6 +151,24 @@
1.4 );
1.5 }
1.6
1.7 + @Test public void longNegate1() throws Exception {
1.8 + final long res = -0x00fa37d7763e0ca1l;
1.9 + assertExec("Long negate",
1.10 + Numbers.class, "negL__J_3B",
1.11 + Double.valueOf(res),
1.12 + new byte[] { (byte)0x00, (byte)0xfa, (byte)0x37, (byte)0xd7, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 }
1.13 + );
1.14 + }
1.15 +
1.16 + @Test public void longNegate2() throws Exception {
1.17 + final long res = -0x80fa37d7763e0ca1l;
1.18 + assertExec("Long negate",
1.19 + Numbers.class, "negL__J_3B",
1.20 + Double.valueOf(res),
1.21 + new byte[] { (byte)0x80, (byte)0xfa, (byte)0x37, (byte)0xd7, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 }
1.22 + );
1.23 + }
1.24 +
1.25 @Test public void longAddOverflow() throws Exception {
1.26 final long res = Long.MAX_VALUE + 1l;
1.27 assertExec("Addition 1+MAX",