Mercurial > hg > openjdk > aarch64-port > nashorn
changeset 1353:37de779feba1
8078384: Test execution blocker: Nashorn testsuite failing due to compile error in jdk/nashorn/api/scripting/test/ScriptEngineTest.java
Reviewed-by: hannesw, jlaskey
author | sundar |
---|---|
date | Wed, 22 Apr 2015 22:49:24 +0530 |
parents | d03eb34e4b84 |
children | 411652a014ff |
files | test/src/jdk/nashorn/api/scripting/test/ScriptEngineTest.java |
diffstat | 1 files changed, 0 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/test/src/jdk/nashorn/api/scripting/test/ScriptEngineTest.java Thu Apr 16 16:01:11 2015 -0700 +++ b/test/src/jdk/nashorn/api/scripting/test/ScriptEngineTest.java Wed Apr 22 22:49:24 2015 +0530 @@ -676,41 +676,6 @@ assertEquals("helloworld", inv.invokeMethod(ctx.get(), "join", "")); } - // @bug JDK-8068889: ConsString arguments to a functional interface wasn't converted to string. - @Test - public void functionalInterfaceStringTest() throws Exception { - final ScriptEngineManager manager = new ScriptEngineManager(); - final ScriptEngine e = manager.getEngineByName("nashorn"); - final AtomicBoolean invoked = new AtomicBoolean(false); - e.put("f", new Function<String, String>() { - @Override - public String apply(String t) { - invoked.set(true); - return t; - } - }); - assertEquals(e.eval("var x = 'a'; x += 'b'; f(x)"), "ab"); - assertTrue(invoked.get()); - } - - // @bug JDK-8068889: ScriptObject arguments to a functional interface wasn't converted to a mirror. - @Test - public void functionalInterfaceObjectTest() throws Exception { - final ScriptEngineManager manager = new ScriptEngineManager(); - final ScriptEngine e = manager.getEngineByName("nashorn"); - final AtomicBoolean invoked = new AtomicBoolean(false); - e.put("c", new Consumer<Object>() { - @Override - public void accept(Object t) { - assertTrue(t instanceof ScriptObjectMirror); - assertEquals(((ScriptObjectMirror)t).get("a"), "xyz"); - invoked.set(true); - } - }); - e.eval("var x = 'xy'; x += 'z';c({a:x})"); - assertTrue(invoked.get()); - } - // @bug 8068524: NashornScriptEngineFactory.getParameter() throws IAE // for an unknown key, doesn't conform to the general spec @Test