[pypy-svn] r26397 - pypy/dist/pypy/translator/cl/test

sanxiyn at codespeak.net sanxiyn at codespeak.net
Thu Apr 27 06:44:20 CEST 2006


Author: sanxiyn
Date: Thu Apr 27 06:44:18 2006
New Revision: 26397

Modified:
   pypy/dist/pypy/translator/cl/test/test_cltrans.py
Log:
Add a simpler failing test for exception handling


Modified: pypy/dist/pypy/translator/cl/test/test_cltrans.py
==============================================================================
--- pypy/dist/pypy/translator/cl/test/test_cltrans.py	(original)
+++ pypy/dist/pypy/translator/cl/test/test_cltrans.py	Thu Apr 27 06:44:18 2006
@@ -33,6 +33,16 @@
     cl_get_three = make_cl_func(get_three)
     assert cl_get_three() == 3
 
+def test_iteration():
+    py.test.skip("needs exception handling")
+    def get_last(num):
+        last = 0
+        for i in range(num):
+            last = i
+        return last
+    cl_get_last = make_cl_func(get_last, [int])
+    assert cl_get_last(5) == 4
+
 def test_if():
     cl_if = make_cl_func(t.if_then_else, [bool, int, int])
     assert cl_if(True, 50, 100) == 50



More information about the Pypy-commit mailing list