[pypy-svn] r48313 - pypy/dist/pypy/rpython/test

fijal at codespeak.net fijal at codespeak.net
Mon Nov 5 12:17:51 CET 2007


Author: fijal
Date: Mon Nov  5 12:17:50 2007
New Revision: 48313

Added:
   pypy/dist/pypy/rpython/test/test_runicode.py   (contents, props changed)
Log:
Add missing unicode test file (not very huge by now)


Added: pypy/dist/pypy/rpython/test/test_runicode.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/rpython/test/test_runicode.py	Mon Nov  5 12:17:50 2007
@@ -0,0 +1,19 @@
+
+
+from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin
+
+class BaseTestRUnicode(BaseRtypingTest):
+    def test_simple(self):
+        def f(n):
+            if n % 2 == 0:
+                x = 'xxx'
+            else:
+                x = u'x\u221Ex'
+            return x[n]
+
+        for i in range(0, 3):
+            res = self.interpret(f, [i])
+            assert res == f(i)
+
+class TestLLtype(BaseTestRUnicode, LLRtypeMixin):
+    pass


More information about the pypy-svn mailing list