[pypy-svn] r57617 - in pypy/dist/pypy: rpython/test translator/oosupport/test_template

antocuni at codespeak.net antocuni at codespeak.net
Mon Aug 25 10:20:56 CEST 2008


Author: antocuni
Date: Mon Aug 25 10:20:54 2008
New Revision: 57617

Modified:
   pypy/dist/pypy/rpython/test/test_rstr.py
   pypy/dist/pypy/rpython/test/tool.py
   pypy/dist/pypy/translator/oosupport/test_template/string.py
Log:
make test_prebuilt_ll_strings working and passing also for oo backends



Modified: pypy/dist/pypy/rpython/test/test_rstr.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rstr.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rstr.py	Mon Aug 25 10:20:54 2008
@@ -816,7 +816,7 @@
             else:
                 return llstr1
         res = self.interpret(f, [0])
-        assert res == self.string_to_ll(None)
+        assert self.ll_to_string(res) is None
         res = self.interpret(f, [1])
         assert self.ll_to_string(res) == "hello"
 

Modified: pypy/dist/pypy/rpython/test/tool.py
==============================================================================
--- pypy/dist/pypy/rpython/test/tool.py	(original)
+++ pypy/dist/pypy/rpython/test/tool.py	Mon Aug 25 10:20:54 2008
@@ -46,6 +46,8 @@
     type_system = 'lltype'
 
     def ll_to_string(self, s):
+        if not s:
+            return None
         return ''.join(s.chars)
 
     def ll_to_unicode(self, s):

Modified: pypy/dist/pypy/translator/oosupport/test_template/string.py
==============================================================================
--- pypy/dist/pypy/translator/oosupport/test_template/string.py	(original)
+++ pypy/dist/pypy/translator/oosupport/test_template/string.py	Mon Aug 25 10:20:54 2008
@@ -33,6 +33,3 @@
         def fn(answer):
             return 'the answer is %s' % answer
         assert self.ll_to_string(self.interpret(fn, [42])) == 'the answer is 42'
-
-    def test_prebuilt_ll_strings(self):
-        py.test.skip("The testing framework doesn't support returning low level strings")



More information about the Pypy-commit mailing list