We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42b7ef8 commit d3b6803Copy full SHA for d3b6803
graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/interop/HostInteropTest.java
@@ -75,6 +75,21 @@ public void tearDown() {
75
context.close();
76
}
77
78
+ public static int TEST_FIELD = 32;
79
+
80
+ @Test
81
+ public void testStaticMembers() {
82
+ int oldValue = TEST_FIELD;
83
+ Value t = context.eval("python", String.format("""
84
+ import java
85
+ jt = java.type("%s")
86
+ oldvalue = jt.TEST_FIELD
87
+ jt.TEST_FIELD = oldvalue + 1
88
+ jt.TEST_FIELD
89
+ """, HostInteropTest.class.getName()));
90
+ assertEquals(oldValue + 1, t.asInt());
91
+ }
92
93
@Test
94
public void testConstantInteropBehavior() {
95
Value t = context.eval("python", """
0 commit comments