Search in sources :

Example 11 with DynamicObjectFactory

use of com.oracle.truffle.api.object.DynamicObjectFactory in project graal by oracle.

the class ShapePropertiesTest method testCreate.

@Test
public void testCreate() {
    final DynamicObjectFactory factory = LAYOUT.createShapePropertiesTestShape(14);
    Assert.assertNotNull(LAYOUT.createShapePropertiesTest(factory, 22));
}
Also used : DynamicObjectFactory(com.oracle.truffle.api.object.DynamicObjectFactory) Test(org.junit.Test)

Example 12 with DynamicObjectFactory

use of com.oracle.truffle.api.object.DynamicObjectFactory in project graal by oracle.

the class ShapePropertiesTest method testObjectGetter.

@Test
public void testObjectGetter() {
    final DynamicObjectFactory factory = LAYOUT.createShapePropertiesTestShape(14);
    final DynamicObject object = LAYOUT.createShapePropertiesTest(factory, 22);
    Assert.assertEquals(14, LAYOUT.getShapeProperty(object));
}
Also used : DynamicObjectFactory(com.oracle.truffle.api.object.DynamicObjectFactory) DynamicObject(com.oracle.truffle.api.object.DynamicObject) Test(org.junit.Test)

Example 13 with DynamicObjectFactory

use of com.oracle.truffle.api.object.DynamicObjectFactory in project graal by oracle.

the class ShapePropertiesTest method testFactoryGetter.

@Test
public void testFactoryGetter() {
    final DynamicObjectFactory factory = LAYOUT.createShapePropertiesTestShape(14);
    Assert.assertEquals(14, LAYOUT.getShapeProperty(factory));
}
Also used : DynamicObjectFactory(com.oracle.truffle.api.object.DynamicObjectFactory) Test(org.junit.Test)

Aggregations

DynamicObjectFactory (com.oracle.truffle.api.object.DynamicObjectFactory)13 Test (org.junit.Test)10 DynamicObject (com.oracle.truffle.api.object.DynamicObject)8 VariableElement (javax.lang.model.element.VariableElement)3 PropertyBuilder (com.oracle.truffle.object.dsl.processor.model.PropertyBuilder)2 TypeMirror (javax.lang.model.type.TypeMirror)2 Shape (com.oracle.truffle.api.object.Shape)1