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

arigo at codespeak.net arigo at codespeak.net
Thu Mar 6 17:37:29 CET 2008


Author: arigo
Date: Thu Mar  6 17:37:28 2008
New Revision: 52222

Modified:
   pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_exception.py
   pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_promotion.py
Log:
Two more tests that pass.


Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_exception.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_exception.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_exception.py	Thu Mar  6 17:37:28 2008
@@ -51,7 +51,6 @@
         self.check_insns({'setfield': 1})
 
     def test_catch(self):
-        py.test.skip("not implemented yet")
         def ll_two(x):
             if x == 0:
                 raise ValueError

Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_promotion.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_promotion.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_promotion.py	Thu Mar  6 17:37:28 2008
@@ -401,6 +401,15 @@
                              policy=StopAtXPolicy(w))
         res == 1
 
+    def test_exception_after_promotion(self):
+        def ll_function(n, m):
+            hint(None, global_merge_point=True)
+            hint(m, promote=True)
+            if m == 0:
+                raise ValueError
+            return n
+        self.interpret_raises(ValueError, ll_function, [1, 0], [])
+
     def test_promote_in_yellow_call(self):
         def ll_two(n):
             n = hint(n, promote=True)


More information about the pypy-svn mailing list