[pypy-svn] r64866 - pypy/branch/pyjitpl5/pypy/jit/metainterp/test

arigo at codespeak.net arigo at codespeak.net
Thu Apr 30 17:07:51 CEST 2009


Author: arigo
Date: Thu Apr 30 17:07:48 2009
New Revision: 64866

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_loop.py
Log:
Don't return a unicode string from a test.
Use hash() to return a number.  Not implemented on ootype...


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_loop.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_loop.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_loop.py	Thu Apr 30 17:07:48 2009
@@ -347,19 +347,10 @@
                 myjitdriver.jit_merge_point(n=n, x=x)
                 x += unichr(n)
                 n -= 1
-            # XXX check if we can cross the border here with unicode,
-            #     if not, sum elements or something
-            return x
+            return hash(x)
         expected = f(100)
         res = self.meta_interp(f, [100])
-        if self.type_system == 'ootype':
-            assert res.ll_strlen() == len(expected)
-            for i in range(len(expected)):
-                assert expected[i] == res.ll_stritem_nonneg(i)
-        else:
-            assert len(res.chars) == len(expected)
-            for i in range(len(expected)):
-                assert expected[i] == res.chars[i]
+        assert res == expected
 
     def test_adapt_bridge_to_merge_point(self):
         myjitdriver = JitDriver(greens = [], reds = ['x', 'z'])
@@ -584,7 +575,8 @@
         res = self.meta_interp(f, [200])
 
 class TestOOtype(LoopTest, OOJitMixin):
-    pass
+    def test_loop_unicode(self):
+        py.test.skip("oohash")
 
 class TestLLtype(LoopTest, LLJitMixin):
     pass



More information about the Pypy-commit mailing list