Author: Antonio Cuni <[email protected]>
Branch: faster-rstruct
Changeset: r80725:6fbe291f9f9b
Date: 2015-11-17 11:24 +0100
http://bitbucket.org/pypy/pypy/changeset/6fbe291f9f9b/

Log:    IN-PROGRESS: we would like this test to pass, failing so far

diff --git a/rpython/jit/metainterp/test/test_rawmem.py 
b/rpython/jit/metainterp/test/test_rawmem.py
--- a/rpython/jit/metainterp/test/test_rawmem.py
+++ b/rpython/jit/metainterp/test/test_rawmem.py
@@ -1,7 +1,8 @@
 from rpython.jit.metainterp.test.support import LLJitMixin
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.rlib.rawstorage import (alloc_raw_storage, raw_storage_setitem,
-                                     free_raw_storage, raw_storage_getitem)
+                                     free_raw_storage, raw_storage_getitem,
+                                     str_storage_getitem)
 
 
 class RawMemTests(object):
@@ -105,6 +106,21 @@
         res = self.interp_operations(f, [])
         assert res == ord('X')
 
+    def test_str_storage_int(self):
+        import struct
+        data = struct.pack('q', 42)
+        def f():
+            res = str_storage_getitem(lltype.Signed, data, 0)
+            return res
+        res = self.interp_operations(f, [])
+        assert res == 42
+        import pdb;pdb.set_trace()
+        self.check_operations_history({'call_i': 1, 'guard_no_exception': 1,
+                                       'call_n': 1,
+                                       'raw_store': 1, 'raw_load_i': 1,
+                                       'finish': 1})
+        self.metainterp.staticdata.stats.check_resops({'finish': 1}, 
omit_finish=False)
+
 
 class TestRawMem(RawMemTests, LLJitMixin):
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to