use of com.oracle.truffle.llvm.test.interop.values.NullValue in project sulong by graalvm.
the class TypedExportTest method testInvalidArrayWrite.
@Test(expected = UnsupportedOperationException.class)
public void testInvalidArrayWrite() {
Value nested = allocNested.execute();
try {
Value pointArray = nested.getMember("pointArray");
pointArray.setArrayElement(2, new NullValue());
} finally {
freeNested.execute(nested);
}
}
use of com.oracle.truffle.llvm.test.interop.values.NullValue in project sulong by graalvm.
the class TypedInteropTest method createNested.
private static Object createNested() {
Object ret = new NullValue();
for (int i = 0; i < 10; i++) {
Map<String, Object> nested = new HashMap<>();
nested.put("arr", new ArrayObject(makePoint(0, 0), makePoint(0, 0), makePoint(0, 0), makePoint(0, 0), makePoint(0, 0)));
nested.put("direct", makePoint(0, 0));
nested.put("next", ret);
ret = new StructObject(nested);
}
return ret;
}
Aggregations