[pypy-svn] r77102 - pypy/trunk/pypy/module/pypyjit/test

hakanardo at codespeak.net hakanardo at codespeak.net
Thu Sep 16 07:56:10 CEST 2010


Author: hakanardo
Date: Thu Sep 16 07:56:09 2010
New Revision: 77102

Modified:
   pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
Testing max with varying nbr of args

Modified: pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
==============================================================================
--- pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	(original)
+++ pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	Thu Sep 16 07:56:09 2010
@@ -1091,6 +1091,28 @@
             return sa
         ''', 51, ([], 2000*3000))
 
+    def test_silly_max(self):
+        self.run_source('''
+        def main():
+            i=2
+            sa=0
+            while i < 2000: 
+                sa+=max(*range(i))
+                i+=1
+            return sa
+        ''', 125, ([], 1997001))
+
+    def test_iter_max(self):
+        self.run_source('''
+        def main():
+            i=2
+            sa=0
+            while i < 2000: 
+                sa+=max(range(i))
+                i+=1
+            return sa
+        ''', 0, ([], 1997001))
+
     # test_circular
 
 class AppTestJIT(PyPyCJITTests):



More information about the Pypy-commit mailing list