[pypy-svn] r14481 - pypy/dist/pypy/translator/llvm2/test
rxe at codespeak.net
rxe at codespeak.net
Mon Jul 11 02:14:33 CEST 2005
Author: rxe
Date: Mon Jul 11 02:14:31 2005
New Revision: 14481
Modified:
pypy/dist/pypy/translator/llvm2/test/test_genllvm.py
Log:
Enable string rpc tests.
Modified: pypy/dist/pypy/translator/llvm2/test/test_genllvm.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/test/test_genllvm.py (original)
+++ pypy/dist/pypy/translator/llvm2/test/test_genllvm.py Mon Jul 11 02:14:31 2005
@@ -93,7 +93,6 @@
assert factorial(4) == 24
assert factorial(5) == 120
-
def test_primitive_is_true():
def var_is_true(v):
return bool(v)
@@ -107,7 +106,6 @@
assert f(256.0)
assert not f(0.0)
-
def test_uint_ops():
def ops(i):
x = r_uint(0)
@@ -141,7 +139,6 @@
assert f(1) == 1
assert f(2) == 2
-
def test_function_call():
def callee():
return 1
@@ -205,7 +202,7 @@
assert f(-1) == 3
assert f(0) == 5
-def DONTtest_simple_chars():
+def test_simple_chars():
def char_constant2(s):
s = s + s + s
return len(s + '.')
@@ -266,7 +263,7 @@
def test_string_simple():
def string_simple(i):
return ord(str(i))
- f = compile_function(string_simple, [int], view=False)
+ f = compile_function(string_simple, [int])
assert f(0)
def test_string_simple_ops():
@@ -282,18 +279,17 @@
f = compile_function(string_simple_ops, [int])
assert f(5) == ord('5') + 2
-
-def DONTtest_string_getitem1():
+def test_string_getitem1():
l = "Hello, World"
def string_getitem1(i):
- return l[i]
- f = compile_function(string_getitem1, [int], view=True)
+ return ord(l[i])
+ f = compile_function(string_getitem1, [int])
assert f(0) == ord("H")
-def DONTtest_string_getitem2():
+def test_string_getitem2():
def string_test(i):
l = "Hello, World"
- return l[i]
+ return ord(l[i])
f = compile_function(string_test, [int])
assert f(0) == ord("H")
More information about the Pypy-commit
mailing list