use of com.oracle.truffle.api.object.DynamicObject in project graal by oracle.
the class ObjectTypeSuperclassTest method testInstanceOf.
@Test
public void testInstanceOf() {
final DynamicObject object = LAYOUT.createObjectTypeSuperclassTest(14);
Assert.assertTrue(object.getShape().getObjectType() instanceof ObjectTypeSuperclass);
}
use of com.oracle.truffle.api.object.DynamicObject in project graal by oracle.
the class SemiFinalPropertiesTest method testSet.
@Test
public void testSet() {
final DynamicObject object = LAYOUT.createSemiFinalPropertiesTest(14);
Assert.assertEquals(14, LAYOUT.getValue(object));
LAYOUT.setValueUnsafe(object, 22);
Assert.assertEquals(22, LAYOUT.getValue(object));
}
use of com.oracle.truffle.api.object.DynamicObject in project graal by oracle.
the class SemiFinalPropertiesTest method testGetDefault.
@Test
public void testGetDefault() {
final DynamicObject object = LAYOUT.createSemiFinalPropertiesTest(14);
Assert.assertEquals(14, LAYOUT.getValue(object));
}
use of com.oracle.truffle.api.object.DynamicObject in project graal by oracle.
the class SemiFinalPropertiesTest method testCreate.
@Test
public void testCreate() {
final DynamicObject object = LAYOUT.createSemiFinalPropertiesTest(14);
Assert.assertNotNull(object);
}
use of com.oracle.truffle.api.object.DynamicObject in project graal by oracle.
the class ShapePropertiesTest method testObjectSetter.
@Test
public void testObjectSetter() {
final DynamicObjectFactory factory = LAYOUT.createShapePropertiesTestShape(14);
final DynamicObject object = LAYOUT.createShapePropertiesTest(factory, 22);
Assert.assertEquals(14, LAYOUT.getShapeProperty(object));
LAYOUT.setShapeProperty(object, 44);
Assert.assertEquals(44, LAYOUT.getShapeProperty(object));
final DynamicObject newObject = LAYOUT.createShapePropertiesTest(factory, 22);
Assert.assertEquals(14, LAYOUT.getShapeProperty(newObject));
}
Aggregations