1.1 --- a/rt/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Thu May 16 08:49:55 2013 +0200
1.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Sun Feb 16 20:06:03 2014 +0100
1.3 @@ -77,16 +77,22 @@
1.4 new byte[] { (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)13, (byte)126 }
1.5 );
1.6 }
1.7 - /* XXX: JavaScript cannot represent as big longs as Java.
1.8 + @Test public void deserializeMiddleLong() throws Exception {
1.9 + final byte[] arr = new byte[] {
1.10 + (byte)0, (byte)0, (byte)64, (byte)32, (byte)23, (byte)0, (byte)0, (byte)0
1.11 + };
1.12 + long exp = Numbers.deserLong(arr, 16);
1.13 + assertExec("Should be " + exp, Numbers.class, "deserLong__J_3BI",
1.14 + Double.valueOf(exp), arr, 16);
1.15 + }
1.16 @Test public void deserializeLargeLong() throws Exception {
1.17 final byte[] arr = new byte[] {
1.18 (byte)64, (byte)8, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0
1.19 };
1.20 - long exp = Numbers.deserLong(arr);
1.21 - assertExec("Should be " + exp, "org_apidesign_vm4brwsr_Numbers_deserLong__JAB",
1.22 - Double.valueOf(exp), arr);
1.23 + long exp = Numbers.deserLong(arr, 32);
1.24 + assertExec("Should be " + exp, Numbers.class, "deserLong__J_3BI",
1.25 + Double.valueOf(exp), arr, 32);
1.26 }
1.27 - */
1.28
1.29 @Test public void deserializeFloatInJava() throws Exception {
1.30 float f = 54324.32423f;