Source

pypy / pypy / rlib / test / test__jit_vref.py

Diff from to

pypy/rlib/test/test__jit_vref.py

         x = self.interpret(f, [])
         assert x is False
 
-    def test_rtype_dereference_or_copy(self):
+    def test_rtype_getfield(self):
+        class X(object):
+            def __init__(self, x):
+                self.x = x
+        
         def f():
-            vref = virtual_ref(X())
-            return vref.dereference_or_copy.x
+            vref = virtual_ref(X(1))
+            return vref.getfield('x')
         x = self.interpret(f, [])
-        assert x == 3
+        assert x == 1
 
 class TestLLtype(BaseTestVRef, LLRtypeMixin):
     OBJECTTYPE = OBJECTPTR
     def castable(self, TO, var):
         return ootype.isSubclass(lltype.typeOf(var), TO)
 
-    def test_rtype_dereference_or_copy(self):
+    def test_rtype_getfield(self):
         py.test.skip("not supported")