[pypy-svn] r14046 - pypy/dist/pypy/translator/llvm2/test

cfbolz at codespeak.net cfbolz at codespeak.net
Fri Jul 1 18:53:05 CEST 2005


Author: cfbolz
Date: Fri Jul  1 18:53:05 2005
New Revision: 14046

Modified:
   pypy/dist/pypy/translator/llvm2/test/test_genllvm.py
Log:
simple string test

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	Fri Jul  1 18:53:05 2005
@@ -86,9 +86,16 @@
     f = compile_function(tuple_getitem, [int])
     assert f(1) == 2 
 
-def test_nested_tuple(): 
+def test_nested_tuple():
     def nested_tuple(i): 
         l = (1,(1,2,i),i)
         return l[1][2]
     f = compile_function(nested_tuple, [int])
     assert f(4) == 4 
+
+def test_string_getitem():
+    def string_test(i): 
+        l = "Hello, World"
+        return l[i]
+    f = compile_function(string_test, [int])
+    assert f(0) == ord("H")



More information about the Pypy-commit mailing list