1.1 --- a/rt/vm/src/test/java/org/apidesign/vm4brwsr/VMLazyTest.java Tue Feb 26 16:54:16 2013 +0100
1.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/VMLazyTest.java Thu Feb 28 07:48:54 2013 +0100
1.3 @@ -22,6 +22,7 @@
1.4 import javax.script.ScriptException;
1.5 import org.testng.annotations.BeforeClass;
1.6 import static org.testng.Assert.*;
1.7 +import org.testng.annotations.AfterClass;
1.8 import org.testng.annotations.Test;
1.9
1.10 /** Implements loading class by class.
1.11 @@ -32,7 +33,7 @@
1.12 private static TestVM code;
1.13
1.14 @BeforeClass
1.15 - public void compileTheCode() throws Exception {
1.16 + public static void compileTheCode() throws Exception {
1.17 StringBuilder sb = new StringBuilder();
1.18 sb.append("\nvar data = {};");
1.19 sb.append("\nfunction test(clazz, method) {");
1.20 @@ -51,6 +52,10 @@
1.21 );
1.22 arr[0].getContext().setAttribute("loader", new BytesLoader(), ScriptContext.ENGINE_SCOPE);
1.23 }
1.24 + @AfterClass
1.25 + public static void releaseTheCode() {
1.26 + code = null;
1.27 + }
1.28
1.29 @Test public void invokeStaticMethod() throws Exception {
1.30 assertExec("Trying to get -1", "test", Double.valueOf(-1),