1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Thu Jan 31 20:19:38 2013 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Thu Jan 31 20:37:12 2013 +0100
1.3 @@ -275,6 +275,36 @@
1.4 );
1.5 }
1.6
1.7 + @Test public void longXor1() throws Exception {
1.8 + final long res = 0x00fa37d7763e0ca1l ^ 0xa7b3432fff00123el;
1.9 + assertExec("Long binary XOR",
1.10 + Numbers.class, "xorL__J_3B_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 + new byte[] { (byte)0xa7, (byte)0xb3, (byte)0x43, (byte)0x2f, (byte)0xff, (byte)0x00, (byte)0x12, (byte)0x3e }
1.14 + );
1.15 + }
1.16 +
1.17 + @Test public void longXor2() throws Exception {
1.18 + final long res = 0x00fa37d7763e0ca1l ^ 0x00000000ff00123el;
1.19 + assertExec("Long binary XOR",
1.20 + Numbers.class, "xorL__J_3B_3B",
1.21 + Double.valueOf(res),
1.22 + new byte[] { (byte)0x00, (byte)0xfa, (byte)0x37, (byte)0xd7, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 },
1.23 + new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xff, (byte)0x00, (byte)0x12, (byte)0x3e }
1.24 + );
1.25 + }
1.26 +
1.27 + @Test public void longXor3() throws Exception {
1.28 + final long res = 0x00000000763e0ca1l ^ 0x00000000ff00123el;
1.29 + assertExec("Long binary XOR",
1.30 + Numbers.class, "xorL__J_3B_3B",
1.31 + Double.valueOf(res),
1.32 + new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 },
1.33 + new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xff, (byte)0x00, (byte)0x12, (byte)0x3e }
1.34 + );
1.35 + }
1.36 +
1.37 private static CharSequence codeSeq;
1.38 private static Invocable code;
1.39