[pypy-svn] r48764 - pypy/dist/pypy/translator/llvm/test

rxe at codespeak.net rxe at codespeak.net
Sat Nov 17 23:54:17 CET 2007


Author: rxe
Date: Sat Nov 17 23:54:17 2007
New Revision: 48764

Added:
   pypy/dist/pypy/translator/llvm/test/test_bigtest.py
Log:
add richards and pystoned as tests

Added: pypy/dist/pypy/translator/llvm/test/test_bigtest.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/translator/llvm/test/test_bigtest.py	Sat Nov 17 23:54:17 2007
@@ -0,0 +1,25 @@
+import py
+from pypy.translator.llvm.test.runtest import *
+
+def test_richards():
+    from pypy.translator.goal.richards import entry_point
+    entry_point = compile_function(entry_point, [int])
+
+    result, start, end = entry_point(1000)
+    assert result
+    assert end - start > 0 and end - start < 5.0
+
+def test_rpystone():
+    #py.test.skip("clock doesnt work")
+
+    # XXX monkey patch hack XXX
+    from time import time
+    import pypy.translator.test.rpystone
+    pypy.translator.test.rpystone.clock = time
+    # XXX monkey patch hack XXX
+    
+    from pypy.translator.test.rpystone import pystones as entry_point
+    entry_point = compile_function(entry_point, [int])
+    t, pystones = entry_point(50000)
+    assert 0 < t < 5
+    assert 100000 < pystones < 100000000



More information about the Pypy-commit mailing list