[pypy-svn] r73791 - pypy/trunk/pypy/jit/tl/test

fijal at codespeak.net fijal at codespeak.net
Thu Apr 15 22:03:52 CEST 2010


Author: fijal
Date: Thu Apr 15 22:03:51 2010
New Revision: 73791

Modified:
   pypy/trunk/pypy/jit/tl/test/test_tinyframe.py
Log:
improve the test


Modified: pypy/trunk/pypy/jit/tl/test/test_tinyframe.py
==============================================================================
--- pypy/trunk/pypy/jit/tl/test/test_tinyframe.py	(original)
+++ pypy/trunk/pypy/jit/tl/test/test_tinyframe.py	Thu Apr 15 22:03:51 2010
@@ -84,15 +84,26 @@
         from StringIO import StringIO
 
         code = compile('''
+        name:
+        RETURN r0
         main:
         LOAD 0 => r1
         PRINT r1
+        LOAD_FUNCTION name => r1
+        PRINT r1
+        ADD r1 r1 => r2
+        PRINT r2
         RETURN r1
         ''')
         s = StringIO()
         sys.stdout = s
         try:
             interpret(code)
-            assert s.getvalue() == '0\n'
         finally:
             sys.stdout = sys.__stdout__
+        lines = s.getvalue().splitlines()
+        assert lines == [
+            '0',
+            '<function name>',
+            '<function <function name>(<function name>)>',
+        ]



More information about the Pypy-commit mailing list