[pypy-svn] r40700 - pypy/dist/pypy/translator/js/test
arigo at codespeak.net
arigo at codespeak.net
Sun Mar 18 14:41:18 CET 2007
Author: arigo
Date: Sun Mar 18 14:41:15 2007
New Revision: 40700
Modified:
pypy/dist/pypy/translator/js/test/test_rsnippet.py
Log:
Leftover from the merge of the jit-virtual-world branch.
Modified: pypy/dist/pypy/translator/js/test/test_rsnippet.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_rsnippet.py (original)
+++ pypy/dist/pypy/translator/js/test/test_rsnippet.py Sun Mar 18 14:41:15 2007
@@ -441,3 +441,13 @@
fn = compile_function(symbolic1, [])
assert fn() == 2
+
+def test_is_early_constant():
+ from pypy.rlib import objectmodel
+ def f(x):
+ if objectmodel._is_early_constant(x):
+ return 42
+ return 0
+ fn = compile_function(f, [int])
+ res = fn(5)
+ assert res == 0
More information about the Pypy-commit
mailing list