Don't mangle with JavaScript when debugging Java only method jdk8
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 12 Aug 2014 20:15:50 +0200
branchjdk8
changeset 1668ec0ee77173e9
parent 1667 335691ea9714
child 1669 139267156f32
Don't mangle with JavaScript when debugging Java only method
rt/vm8/src/test/java/org/apidesign/bck2brwsr/vm8/InvokeDynamicTest.java
     1.1 --- a/rt/vm8/src/test/java/org/apidesign/bck2brwsr/vm8/InvokeDynamicTest.java	Tue Aug 12 19:22:39 2014 +0200
     1.2 +++ b/rt/vm8/src/test/java/org/apidesign/bck2brwsr/vm8/InvokeDynamicTest.java	Tue Aug 12 20:15:50 2014 +0200
     1.3 @@ -56,13 +56,25 @@
     1.4      }
     1.5      
     1.6      @Test public void simpleDynamicInJS() throws Exception {
     1.7 -        code.assertExec(
     1.8 +        code().assertExec(
     1.9              "Invoke dynamic can return a value", InvokeDynamic.class,
    1.10              "dynamicSay__Ljava_lang_String_2",
    1.11              "Hello from Dynamic!"
    1.12          );
    1.13      }
    1.14      
    1.15 +    private TestVM code() throws Exception {
    1.16 +        if (code == null) {
    1.17 +            final EmulResWithInvDyn emul = new EmulResWithInvDyn();
    1.18 +            code = TestVM.compileClass(
    1.19 +                    null, null, emul,
    1.20 +                    InvokeDynamic.class.getName().replace('.', '/')
    1.21 +            );
    1.22 +
    1.23 +            assertTrue(emul.loaded, "InvokeDynamic class should be processed!");
    1.24 +        }
    1.25 +        return code;
    1.26 +    }
    1.27  
    1.28      @AfterClass
    1.29      public static void releaseTheCode() {
    1.30 @@ -115,14 +127,6 @@
    1.31          };
    1.32          invokeDynamicClass = l.loadClass(InvokeDynamic.class.getName());
    1.33          assertTrue(loaded[0], "InvokeDynamic class should be loaded!");
    1.34 -
    1.35 -        final EmulResWithInvDyn emul = new EmulResWithInvDyn();
    1.36 -        code = TestVM.compileClass(
    1.37 -            null, null, emul,
    1.38 -            InvokeDynamic.class.getName().replace('.', '/')
    1.39 -        );
    1.40 -        
    1.41 -        assertTrue(emul.loaded, "InvokeDynamic class should be processed!");
    1.42      }
    1.43      
    1.44