1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Mon Nov 26 20:29:21 2012 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Tue Dec 04 09:16:53 2012 +0100
1.3 @@ -29,19 +29,19 @@
1.4 */
1.5 public class NumberTest {
1.6 @Test public void integerFromString() throws Exception {
1.7 - assertExec("Can convert string to integer", Integer.class, "parseIntILjava_lang_String",
1.8 + assertExec("Can convert string to integer", Integer.class, "parseInt__ILjava_lang_String_2",
1.9 Double.valueOf(333), "333"
1.10 );
1.11 }
1.12
1.13 @Test public void doubleFromString() throws Exception {
1.14 - assertExec("Can convert string to double", Double.class, "parseDoubleDLjava_lang_String",
1.15 + assertExec("Can convert string to double", Double.class, "parseDouble__DLjava_lang_String_2",
1.16 Double.valueOf(33.3), "33.3"
1.17 );
1.18 }
1.19
1.20 @Test public void autoboxDouble() throws Exception {
1.21 - assertExec("Autoboxing of doubles is OK", Numbers.class, "autoboxDblToStringLjava_lang_String",
1.22 + assertExec("Autoboxing of doubles is OK", Numbers.class, "autoboxDblToString__Ljava_lang_String_2",
1.23 "3.3"
1.24 );
1.25 }
1.26 @@ -51,7 +51,7 @@
1.27 }
1.28
1.29 @Test public void jslog1000() throws Exception {
1.30 - assertExec("log_10(1000) == 3", Math.class, "log10DD",
1.31 + assertExec("log_10(1000) == 3", Math.class, "log10__DD",
1.32 Double.valueOf(3.0), 1000.0
1.33 );
1.34 }
1.35 @@ -60,20 +60,20 @@
1.36 assertEquals(3, Numbers.rem(303, 10));
1.37 }
1.38 @Test public void jsRem() throws Exception {
1.39 - assertExec("Should be three", Numbers.class, "remIII",
1.40 + assertExec("Should be three", Numbers.class, "rem__III",
1.41 Double.valueOf(3.0), 303, 10
1.42 );
1.43 }
1.44
1.45 @Test public void deserializeInt() throws Exception {
1.46 int exp = Numbers.deserInt();
1.47 - assertExec("Should be the same", Numbers.class, "deserIntI",
1.48 + assertExec("Should be the same", Numbers.class, "deserInt__I",
1.49 Double.valueOf(exp)
1.50 );
1.51 }
1.52
1.53 @Test public void deserializeSimpleLong() throws Exception {
1.54 - assertExec("Should be 3454", Numbers.class, "deserLongJAB",
1.55 + assertExec("Should be 3454", Numbers.class, "deserLong__J_3B",
1.56 Double.valueOf(3454),
1.57 new byte[] { (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)13, (byte)126 }
1.58 );
1.59 @@ -84,7 +84,7 @@
1.60 (byte)64, (byte)8, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0
1.61 };
1.62 long exp = Numbers.deserLong(arr);
1.63 - assertExec("Should be " + exp, "org_apidesign_vm4brwsr_Numbers_deserLongJAB",
1.64 + assertExec("Should be " + exp, "org_apidesign_vm4brwsr_Numbers_deserLong__JAB",
1.65 Double.valueOf(exp), arr);
1.66 }
1.67 */
1.68 @@ -97,7 +97,7 @@
1.69
1.70 @Test public void deserializeFloatInJS() throws Exception {
1.71 float f = 54324.32423f;
1.72 - assertExec("Should be the same", Numbers.class, "deserFloatF",
1.73 + assertExec("Should be the same", Numbers.class, "deserFloat__F",
1.74 Double.valueOf(f)
1.75 );
1.76 }
1.77 @@ -110,7 +110,7 @@
1.78
1.79 @Test public void deserializeDoubleInJS() throws Exception {
1.80 double f = 3.0;
1.81 - assertExec("Should be the same", Numbers.class, "deserDoubleD", f);
1.82 + assertExec("Should be the same", Numbers.class, "deserDouble__D", f);
1.83 }
1.84 /*
1.85 @Test public void serDouble() throws IOException {
1.86 @@ -131,7 +131,7 @@
1.87 @Test public void fiveInStringJS() throws Exception {
1.88 String s = Numbers.intToString();
1.89 assertExec("Should be the same: " + s,
1.90 - Numbers.class, "intToStringLjava_lang_String",
1.91 + Numbers.class, "intToString__Ljava_lang_String_2",
1.92 s
1.93 );
1.94 }
1.95 @@ -139,7 +139,7 @@
1.96 @Test public void sevenInStringJS() throws Exception {
1.97 String s = Numbers.floatToString();
1.98 assertExec("Should be the same: " + s,
1.99 - Numbers.class, "floatToStringLjava_lang_String",
1.100 + Numbers.class, "floatToString__Ljava_lang_String_2",
1.101 s
1.102 );
1.103 }