Author: Maciej Fijalkowski <[email protected]>
Branch: inline-dict-ops
Changeset: r45903:d0af6a58e1b1
Date: 2011-07-23 19:34 +0200
http://bitbucket.org/pypy/pypy/changeset/d0af6a58e1b1/
Log: improve tests
diff --git a/pypy/jit/backend/test/runner_test.py
b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -883,12 +883,12 @@
self.execute_operation(rop.SETINTERIORFIELD_GC, [a_box, BoxInt(3),
BoxFloat(1.5)],
'void', descr=kdescr)
- #f = self.cpu.bh_getinteriorfield_gc_f(a_box.getref_base(), 3, kdescr)
- #assert f == 1.5
- #self.cpu.bh_setinteriorfield_gc_f(a_box.getref_base(), 3, kdescr, 2.5)
+ f = self.cpu.bh_getinteriorfield_gc_f(a_box.getref_base(), 3, kdescr)
+ assert f == 1.5
+ self.cpu.bh_setinteriorfield_gc_f(a_box.getref_base(), 3, kdescr, 2.5)
r = self.execute_operation(rop.GETINTERIORFIELD_GC, [a_box, BoxInt(3)],
'float', descr=kdescr)
- assert r.getfloat() == 1.5
+ assert r.getfloat() == 2.5
self.execute_operation(rop.SETINTERIORFIELD_GC, [a_box, BoxInt(3),
BoxInt(15)],
'void', descr=vdescr)
@@ -898,9 +898,13 @@
r = self.execute_operation(rop.GETINTERIORFIELD_GC, [a_box, BoxInt(3)],
'int', descr=vdescr)
assert r.getint() == 25
- self.execute_operation(rop.SETINTERIORFIELD_GC, [a_box, BoxInt(3),
+ self.execute_operation(rop.SETINTERIORFIELD_GC, [a_box, BoxInt(4),
s_box],
'void', descr=pdescr)
+ r = self.cpu.bh_getinteriorfield_gc_r(a_box.getref_base(), 4, pdescr)
+ assert r == s_box.getref_base()
+ self.cpu.bh_setinteriorfield_gc_r(a_box.getref_base(), 3, pdescr,
+ s_box.getref_base())
r = self.execute_operation(rop.GETINTERIORFIELD_GC, [a_box, BoxInt(3)],
'ref', descr=pdescr)
assert r.getref_base() == s_box.getref_base()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit