use of com.oracle.truffle.llvm.test.interop.values.BoxedTestValue in project sulong by graalvm.
the class LLVMInteropTest method test013.
@Test
public void test013() {
try (Runner runner = new Runner("interop013")) {
runner.export(new BoxedTestValue(42), "foreign");
Assert.assertEquals(42, runner.run());
}
}
use of com.oracle.truffle.llvm.test.interop.values.BoxedTestValue in project sulong by graalvm.
the class LLVMInteropTest method test014.
@Test
public void test014() {
try (Runner runner = new Runner("interop014")) {
runner.export(new BoxedTestValue(42), "foreign");
Assert.assertEquals(42, runner.run(), 0.1);
}
}
use of com.oracle.truffle.llvm.test.interop.values.BoxedTestValue in project sulong by graalvm.
the class PolyglotScopeTest method testImportBoxed.
@Test
public void testImportBoxed(@Inject(TestImportVarNode.class) CallTarget testImport) {
String value = "testImportBoxedValue";
runWithPolyglot.getPolyglotContext().getPolyglotBindings().putMember("boxedName", value);
Object ret = testImport.call(new BoxedTestValue("boxedName"));
Assert.assertEquals(value, ret);
}
use of com.oracle.truffle.llvm.test.interop.values.BoxedTestValue in project sulong by graalvm.
the class StringTest method testAsStringBoxed.
@Test
public void testAsStringBoxed(@Inject(TestAsStringAsciiNode.class) CallTarget asString) {
Object ret = asString.call(new BoxedTestValue(ASCII_STRING));
Assert.assertEquals(ASCII_LENGTH, ret);
}
use of com.oracle.truffle.llvm.test.interop.values.BoxedTestValue in project sulong by graalvm.
the class StringTest method testStringSizeBoxed.
@Test
public void testStringSizeBoxed(@Inject(TestStringSizeNode.class) CallTarget getSize) {
Object ret = getSize.call(new BoxedTestValue(ASCII_STRING));
Assert.assertEquals((long) ASCII_STRING.length(), ret);
}
Aggregations