1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/StaticMethodTest.java Wed Dec 12 09:09:42 2012 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/StaticMethodTest.java Fri Jan 25 11:00:52 2013 +0100
1.3 @@ -270,17 +270,8 @@
1.4 String msg, Class clazz, String method,
1.5 Object expRes, Object... args
1.6 ) throws Exception {
1.7 - Object ret = null;
1.8 - try {
1.9 - ret = toRun.invokeFunction("bck2brwsr");
1.10 - ret = toRun.invokeMethod(ret, "loadClass", clazz.getName());
1.11 - ret = toRun.invokeMethod(ret, method, args);
1.12 - } catch (ScriptException ex) {
1.13 - fail("Execution failed in\n" + dumpJS(theCode), ex);
1.14 - } catch (NoSuchMethodException ex) {
1.15 - fail("Cannot find method in\n" + dumpJS(theCode), ex);
1.16 - }
1.17 - if (ret == null && expRes == null) {
1.18 + Object ret = TestUtils.execCode(toRun, theCode, msg, clazz, method, expRes, args);
1.19 + if (ret == null) {
1.20 return;
1.21 }
1.22 if (expRes != null && expRes.equals(ret)) {