Test at least a bit of obfuscation in same unit test
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 26 Sep 2014 09:22:31 +0200
changeset 170761dd2c555a1f
parent 1706 65c6f805797f
child 1708 8e627eb9edf1
Test at least a bit of obfuscation in same unit test
rt/vm/src/test/java/org/apidesign/vm4brwsr/Resources.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java
     1.1 --- a/rt/vm/src/test/java/org/apidesign/vm4brwsr/Resources.java	Fri Sep 26 09:21:49 2014 +0200
     1.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/Resources.java	Fri Sep 26 09:22:31 2014 +0200
     1.3 @@ -48,7 +48,8 @@
     1.4      }
     1.5      
     1.6      static String loadClazz() throws IOException {
     1.7 -        InputStream is = Resources.class.getResourceAsStream("Bck2BrwsrToolkit.class");
     1.8 +        Object o = new Resources();
     1.9 +        InputStream is = o.getClass().getResourceAsStream("Bck2BrwsrToolkit.class");
    1.10          return readIS(is, false);
    1.11      }
    1.12  
     2.1 --- a/rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java	Fri Sep 26 09:21:49 2014 +0200
     2.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java	Fri Sep 26 09:22:31 2014 +0200
     2.3 @@ -170,7 +170,8 @@
     2.4              ScriptEngineManager sem = new ScriptEngineManager();
     2.5              ScriptEngine js = sem.getEngineByExtension("js");
     2.6              eng[0] = js;
     2.7 -            Bck2Brwsr.generate(sb, new EmulationResources());
     2.8 +            Bck2Brwsr.newCompiler().resources(new EmulationResources())
     2.9 +                .obfuscation(ObfuscationLevel.FULL).generate(sb);
    2.10          }
    2.11          Set<String> exp = new HashSet<String>();
    2.12          for (String n : names) {