[pypy-svn] r51215 - pypy/branch/jit-refactoring/pypy/jit/rainbow/test

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Feb 2 17:23:36 CET 2008


Author: cfbolz
Date: Sat Feb  2 17:23:36 2008
New Revision: 51215

Modified:
   pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py
Log:
a slightly more complex test


Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py	Sat Feb  2 17:23:36 2008
@@ -203,6 +203,18 @@
         res = self.interpret(ll_function, [7, 2])
         assert res == 14
 
+    def test_loop_merging2(self):
+        def ll_function(x, y):
+            tot = 0
+            while x:
+                if tot < 3:
+                    tot *= y
+                else:
+                    tot += y
+                x -= 1
+            return tot
+        res = self.interpret(ll_function, [7, 2])
+        assert res == 0
 
 class TestLLType(AbstractInterpretationTest):
     type_system = "lltype"



More information about the Pypy-commit mailing list