-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
In trying to move SciJava to v 3.5-beta76 (from 0.9) one of our unit tests is failing with an assertNull after RenjinBindings.clear(). Based on Renjin source everything looks correct. Furthermore, both javax.script.ScriptEngine.put() and javax.script.ScriptEngine.remove() behave predictably. Any insight would be appreciated, thanks.
final Context context = new Context(ScriptService.class);
final ScriptService scriptService = context.getService(ScriptService.class);
final ScriptLanguage language = scriptService.getLanguageByExtension("r");
final ScriptEngine engine = language.getScriptEngine();
assertEquals(RenjinScriptEngine.class, engine.getClass());
engine.put("hello", 17);
assertEquals(17, RenjinUtils.getJavaValue((SEXP) engine.eval("hello")));
assertEquals(17, RenjinUtils.getJavaValue((SEXP) engine.get("hello")));
RenjinBindings bindings = (RenjinBindings)engine.getBindings(ScriptContext.ENGINE_SCOPE);
bindings.clear();
System.out.println("Binding 2:" + bindings.get("hello"));
assertNull(RenjinUtils.getJavaValue((SEXP) engine.get("hello")));
assertNull(RenjinUtils.getJavaValue((SEXP) engine.get("polar_kraken")));
Metadata
Metadata
Assignees
Labels
No labels