[pypy-svn] r72718 - pypy/branch/fix-64/pypy/rlib/test
arigo at codespeak.net
arigo at codespeak.net
Wed Mar 24 15:49:47 CET 2010
Author: arigo
Date: Wed Mar 24 15:49:45 2010
New Revision: 72718
Modified:
pypy/branch/fix-64/pypy/rlib/test/test_rstruct.py
Log:
Fix test.
Modified: pypy/branch/fix-64/pypy/rlib/test/test_rstruct.py
==============================================================================
--- pypy/branch/fix-64/pypy/rlib/test/test_rstruct.py (original)
+++ pypy/branch/fix-64/pypy/rlib/test/test_rstruct.py Wed Mar 24 15:49:45 2010
@@ -1,12 +1,14 @@
from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
from pypy.rlib.rstruct.runpack import runpack
+from pypy.rlib.rarithmetic import LONG_BIT
import struct
class BaseTestRStruct(BaseRtypingTest):
def test_unpack(self):
+ pad = '\x00' * (LONG_BIT//8-1) # 3 or 7 null bytes
def fn():
- return runpack('sll', 'a\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00')[1]
+ return runpack('sll', 'a'+pad+'\x03'+pad+'\x04'+pad)[1]
assert fn() == 3
assert self.interpret(fn, []) == 3
More information about the Pypy-commit
mailing list