[pypy-svn] r47406 - in pypy/dist/pypy/translator: jvm/test oosupport/test_template
antocuni at codespeak.net
antocuni at codespeak.net
Fri Oct 12 10:26:50 CEST 2007
Author: antocuni
Date: Fri Oct 12 10:26:49 2007
New Revision: 47406
Modified:
pypy/dist/pypy/translator/jvm/test/test_op.py
pypy/dist/pypy/translator/jvm/test/test_runtest.py
pypy/dist/pypy/translator/oosupport/test_template/operations.py
pypy/dist/pypy/translator/oosupport/test_template/runtest.py
Log:
add r_ulonglong tests that fails with genjvm
Modified: pypy/dist/pypy/translator/jvm/test/test_op.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_op.py (original)
+++ pypy/dist/pypy/translator/jvm/test/test_op.py Fri Oct 12 10:26:49 2007
@@ -5,5 +5,5 @@
# ====> ../../oosupport/test_template/operations.py
class TestOperations(JvmTest, BaseTestOperations):
- pass
-
+ def test_compare_big_ulongs(self):
+ py.test.skip('fixme!')
Modified: pypy/dist/pypy/translator/jvm/test/test_runtest.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_runtest.py (original)
+++ pypy/dist/pypy/translator/jvm/test/test_runtest.py Fri Oct 12 10:26:49 2007
@@ -2,4 +2,6 @@
from pypy.translator.jvm.test.runtest import JvmTest
class TestRunTest(BaseTestRunTest, JvmTest):
- pass
+ def test_big_ullong(self):
+ import py
+ py.test.skip('fixme!')
Modified: pypy/dist/pypy/translator/oosupport/test_template/operations.py
==============================================================================
--- pypy/dist/pypy/translator/oosupport/test_template/operations.py (original)
+++ pypy/dist/pypy/translator/oosupport/test_template/operations.py Fri Oct 12 10:26:49 2007
@@ -205,3 +205,15 @@
x = sys.maxint+1
assert self.interpret(f, [r_ulonglong(x)]) == x >> 1
+ def test_compare_big_ulongs(self):
+ bigval = r_ulonglong(9223372036854775808L)
+ def fn(x):
+ if x > bigval: return 1
+ if x == bigval: return 0
+ if x < bigval: return -1
+ return -2
+
+ for val in (bigval-1, bigval, bigval+1):
+ expected = fn(val)
+ res = self.interpret(fn, [val])
+ assert res == expected
Modified: pypy/dist/pypy/translator/oosupport/test_template/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/oosupport/test_template/runtest.py (original)
+++ pypy/dist/pypy/translator/oosupport/test_template/runtest.py Fri Oct 12 10:26:49 2007
@@ -51,6 +51,10 @@
def test_ullong(self):
assert self.interpret(ident, [r_ulonglong(sys.maxint+1)]) == sys.maxint+1
+ def test_big_ullong(self):
+ bigval = 9223372036854775807L
+ assert self.interpret(ident, [r_ulonglong(bigval)]) == bigval
+
def test_exception(self):
def fn():
raise ValueError
More information about the pypy-svn
mailing list