Skip to content

Commit fff3cca

Browse files
committed
Correction of ForeignBoxedObjectTest.testForeignNull().
1 parent 9c7eaa4 commit fff3cca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graal-js/src/com.oracle.truffle.js.test/src/com/oracle/truffle/js/test/interop/ForeignBoxedObjectTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public class ForeignBoxedObjectTest {
5757
public void testForeignNull() {
5858
try (Context context = JSTest.newContextBuilder().build()) {
5959
context.getBindings("js").putMember("obj", new ForeignNull());
60-
assertTrue(context.eval(ID, "try { Object(obj); false; } catch (e) { e instanceof TypeError }").asBoolean());
60+
assertTrue(context.eval(ID, "Object.getPrototypeOf(Object(obj)) === Object.prototype").asBoolean());
61+
assertTrue(context.eval(ID, "Object.getPrototypeOf(new Object(obj)) === Object.prototype").asBoolean());
62+
assertTrue(context.eval(ID, "Object.getPrototypeOf(Object.create(obj)) === null").asBoolean());
6163
assertTrue(context.eval(ID, "try { obj.foo; false; } catch (e) { e instanceof TypeError }").asBoolean());
6264
assertTrue(context.eval(ID, "try { obj.foo(); false; } catch (e) { e instanceof TypeError }").asBoolean());
6365
}

0 commit comments

Comments
 (0)