1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/StaticMethodTest.java Thu Nov 08 18:34:12 2012 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/StaticMethodTest.java Sat Nov 17 17:43:15 2012 +0100
1.3 @@ -275,15 +275,17 @@
1.4 return (Invocable)js;
1.5 } catch (Exception ex) {
1.6 if (sb.length() > 2000) {
1.7 - File f = File.createTempFile("execution", ".js");
1.8 - FileWriter w = new FileWriter(f);
1.9 - w.append(sb);
1.10 - w.close();
1.11 - sb.setLength(0);
1.12 - sb.append(f.getPath());
1.13 + dumpJS(sb);
1.14 }
1.15 fail("Could not compile:\n" + sb, ex);
1.16 return null;
1.17 }
1.18 }
1.19 + static String dumpJS(CharSequence sb) throws IOException {
1.20 + File f = File.createTempFile("execution", ".js");
1.21 + FileWriter w = new FileWriter(f);
1.22 + w.append(sb);
1.23 + w.close();
1.24 + return f.getPath();
1.25 + }
1.26 }