43
43
import java .util .Arrays ;
44
44
import java .util .List ;
45
45
46
- import com .oracle .truffle .api .object .DynamicObject ;
47
- import com .oracle .truffle .api .object .DynamicObjectLibrary ;
48
- import com .oracle .truffle .api .object .Property ;
49
- import com .oracle .truffle .api .object .Shape ;
50
46
import org .hamcrest .CoreMatchers ;
51
47
import org .hamcrest .MatcherAssert ;
52
48
import org .junit .Assert ;
55
51
import org .junit .runners .Parameterized ;
56
52
import org .junit .runners .Parameterized .Parameters ;
57
53
54
+ import com .oracle .truffle .api .object .DynamicObject ;
55
+ import com .oracle .truffle .api .object .Property ;
56
+ import com .oracle .truffle .api .object .Shape ;
57
+
58
58
@ SuppressWarnings ("deprecation" )
59
59
@ RunWith (Parameterized .class )
60
60
public class ConstantLocationTest extends ParametrizedDynamicObjectTest {
@@ -80,7 +80,7 @@ private DynamicObject newInstanceWithConstant() {
80
80
public void testConstantLocation () {
81
81
DynamicObject object = newInstanceWithConstant ();
82
82
83
- DynamicObjectLibrary library = createLibrary (object );
83
+ var library = createLibrary (object );
84
84
85
85
Assert .assertSame (value , library .getOrDefault (object , "constant" , null ));
86
86
@@ -111,7 +111,7 @@ public void testConstantLocation() {
111
111
public void testMigrateConstantLocation () {
112
112
DynamicObject object = newInstanceWithConstant ();
113
113
114
- DynamicObjectLibrary library = createLibrary (object );
114
+ var library = createLibrary (object );
115
115
116
116
Assert .assertSame (shapeWithConstant , object .getShape ());
117
117
Assert .assertSame (value , library .getOrDefault (object , "constant" , null ));
@@ -129,7 +129,7 @@ public void testAddConstantLocation() throws com.oracle.truffle.api.object.Incom
129
129
130
130
DynamicObject object = newInstance ();
131
131
132
- DynamicObjectLibrary library = createLibrary (object );
132
+ var library = createLibrary (object );
133
133
134
134
property .getLocation ().set (object , value , rootShape , shapeWithConstant );
135
135
Assert .assertSame (shapeWithConstant , object .getShape ());
@@ -156,7 +156,7 @@ public void testGetConstantValue() {
156
156
157
157
DynamicObject object = newInstance ();
158
158
159
- DynamicObjectLibrary library = createLibrary (object );
159
+ var library = createLibrary (object );
160
160
library .put (object , "other" , "otherValue" );
161
161
162
162
Property otherProperty = object .getShape ().getProperty ("other" );
0 commit comments