[pypy-svn] r53989 - pypy/branch/jit-hotpath/pypy/translator/backendopt/test

antocuni at codespeak.net antocuni at codespeak.net
Tue Apr 22 10:54:24 CEST 2008


Author: antocuni
Date: Tue Apr 22 10:54:22 2008
New Revision: 53989

Modified:
   pypy/branch/jit-hotpath/pypy/translator/backendopt/test/test_graphanalyze.py
Log:
TestOOType passes out of the box; I couldn't find any test that passes
on lltype but fails on ootype due to lack of "pure" annotation to
builtin methods



Modified: pypy/branch/jit-hotpath/pypy/translator/backendopt/test/test_graphanalyze.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/translator/backendopt/test/test_graphanalyze.py	(original)
+++ pypy/branch/jit-hotpath/pypy/translator/backendopt/test/test_graphanalyze.py	Tue Apr 22 10:54:22 2008
@@ -61,11 +61,20 @@
         res = impurity.analyze_direct_call(self.translator.graphs[0])
         assert res is False     # not impure
 
+# XXX failing test
+##    def test_builtin_method(self):
+##        def fn(flag):
+##            if flag:
+##                s = "foo" + str(flag)
+##            else:
+##                s = "bar" + str(flag)
+##            return len(s)
+##        impurity = self.translate(fn, [bool])
+##        res = impurity.analyze_direct_call(self.translator.graphs[0])
+##        assert res is False     # not impure
 
 class TestLLType(LLRtypeMixin, BaseTestImpurityAnalyzer):
     pass
 
-# no chance on OOType before we add "pure" annotations on
-# all the relevant built-in methods
-#class TestOOType(OORtypeMixin, BaseTestImpurityAnalyzer):
-#    pass
+class TestOOType(OORtypeMixin, BaseTestImpurityAnalyzer):
+    pass



More information about the Pypy-commit mailing list