[pypy-svn] r45404 - pypy/dist/pypy/translator/jvm/test

antocuni at codespeak.net antocuni at codespeak.net
Fri Jul 27 15:05:17 CEST 2007


Author: antocuni
Date: Fri Jul 27 15:05:17 2007
New Revision: 45404

Modified:
   pypy/dist/pypy/translator/jvm/test/test_overflow.py
Log:
make genjvm reuse test_overflow from oosupport 



Modified: pypy/dist/pypy/translator/jvm/test/test_overflow.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_overflow.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_overflow.py	Fri Jul 27 15:05:17 2007
@@ -1,49 +1,13 @@
-# check does not exist because it involves an extensive overhaul on runtest.  See CLI's runtest for an example.
-#from pypy.translator.jvm.test.runtest import check 
 import py
 from pypy.translator.jvm.test.runtest import JvmTest
-from pypy.rlib.rarithmetic import ovfcheck
+from pypy.translator.oosupport.test_template.overflow import BaseTestOverflow
 
-import sys
+class TestOverflow(BaseTestOverflow, JvmTest):
+    def test_sub(self):
+        py.test.skip('fixme!')
+
+    def test_lshift(self):
+        py.test.skip('fixme!')
 
-class TestJvmOperation(JvmTest):
-    def test_recursive(self):
-        py.test.skip("JVM runtest lacks support to run these tests")
 
-#def op_add(x, y):
-#    try:
-#        return ovfcheck(x+y)
-#    except OverflowError:
-#        return 42
-#
-#def op_sub(x, y):
-#    try:
-#        return ovfcheck(x-y)
-#    except OverflowError:
-#        return 42
-#
-#def op_mul(x, y):
-#    try:
-#        return ovfcheck(x*y)
-#    except OverflowError:
-#        return 42
-#
-#def op_lshift(x, y):
-#    try:
-#        return ovfcheck(x<<y)
-#    except OverflowError:
-#        return 42
-#
-#def op_neg(x):
-#    try:
-#        return ovfcheck(-x)
-#    except OverflowError:
-#        return 42
-#
-#def test_overflow():
-#    yield check, op_add, [int, int], (sys.maxint, 1)
-#    yield check, op_sub, [int, int], (-sys.maxint, 1)
-#    yield check, op_mul, [int, int], (sys.maxint/2 + 1, 2)
-#    yield check, op_lshift, [int, int], (2, 30)
-#    yield check, op_neg, [int], (-sys.maxint-1,)
 



More information about the Pypy-commit mailing list