Skip to content

Commit 85f8f95

Browse files
committed
Wrap DynamicObjectLibrary for tests and fix visibility.
1 parent ad015b7 commit 85f8f95

File tree

12 files changed

+361
-167
lines changed

12 files changed

+361
-167
lines changed

truffle/src/com.oracle.truffle.api.object.test/src/com/oracle/truffle/api/object/test/ConstantLocationTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
import java.util.Arrays;
4444
import java.util.List;
4545

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;
5046
import org.hamcrest.CoreMatchers;
5147
import org.hamcrest.MatcherAssert;
5248
import org.junit.Assert;
@@ -55,6 +51,10 @@
5551
import org.junit.runners.Parameterized;
5652
import org.junit.runners.Parameterized.Parameters;
5753

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+
5858
@SuppressWarnings("deprecation")
5959
@RunWith(Parameterized.class)
6060
public class ConstantLocationTest extends ParametrizedDynamicObjectTest {
@@ -80,7 +80,7 @@ private DynamicObject newInstanceWithConstant() {
8080
public void testConstantLocation() {
8181
DynamicObject object = newInstanceWithConstant();
8282

83-
DynamicObjectLibrary library = createLibrary(object);
83+
var library = createLibrary(object);
8484

8585
Assert.assertSame(value, library.getOrDefault(object, "constant", null));
8686

@@ -111,7 +111,7 @@ public void testConstantLocation() {
111111
public void testMigrateConstantLocation() {
112112
DynamicObject object = newInstanceWithConstant();
113113

114-
DynamicObjectLibrary library = createLibrary(object);
114+
var library = createLibrary(object);
115115

116116
Assert.assertSame(shapeWithConstant, object.getShape());
117117
Assert.assertSame(value, library.getOrDefault(object, "constant", null));
@@ -129,7 +129,7 @@ public void testAddConstantLocation() throws com.oracle.truffle.api.object.Incom
129129

130130
DynamicObject object = newInstance();
131131

132-
DynamicObjectLibrary library = createLibrary(object);
132+
var library = createLibrary(object);
133133

134134
property.getLocation().set(object, value, rootShape, shapeWithConstant);
135135
Assert.assertSame(shapeWithConstant, object.getShape());
@@ -156,7 +156,7 @@ public void testGetConstantValue() {
156156

157157
DynamicObject object = newInstance();
158158

159-
DynamicObjectLibrary library = createLibrary(object);
159+
var library = createLibrary(object);
160160
library.put(object, "other", "otherValue");
161161

162162
Property otherProperty = object.getShape().getProperty("other");

0 commit comments

Comments
 (0)