[pypy-svn] r64540 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test

arigo at codespeak.net arigo at codespeak.net
Tue Apr 21 18:49:41 CEST 2009


Author: arigo
Date: Tue Apr 21 18:49:38 2009
New Revision: 64540

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py
Log:
(antocuni, arigo)
Yay, all remaining test_basic tests pass on OOType too.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py	Tue Apr 21 18:49:38 2009
@@ -471,18 +471,6 @@
         for n, k in [(20, 0), (20, 1)]:
             interp.eval_graph(graph, [n, k])
 
-    def test_casts(self):
-        from pypy.rpython.lltypesystem import lltype, llmemory
-        
-        TP = lltype.GcStruct('x')
-        def f(p):
-            n = lltype.cast_ptr_to_int(p)
-            return lltype.cast_int_to_ptr(lltype.Ptr(TP), n)
-
-        x = lltype.malloc(TP)
-        expected = lltype.cast_opaque_ptr(llmemory.GCREF, x)
-        assert self.interp_operations(f, [x]) == expected
-
     def test_instantiate_classes(self):
         class Base: pass
         class A(Base): foo = 72
@@ -500,14 +488,7 @@
 
 
 class TestOOtype(BasicTests, OOJitMixin):
-    def skip(self):
-        py.test.skip('in-progress')
-
-    #test_print = skip
-    test_bridge_from_interpreter_2 = skip
-    test_bridge_from_interpreter_3 = skip
-    test_bridge_from_interpreter_4 = skip
-    test_casts = skip
+    pass
 
 
 class TestLLtype(BasicTests, LLJitMixin):
@@ -526,3 +507,15 @@
         expected = f(x, x)
         assert self.interp_operations(f, [x, x]) == expected
         lltype.free(x, flavor='raw')
+
+    def test_casts(self):
+        from pypy.rpython.lltypesystem import lltype, llmemory
+        
+        TP = lltype.GcStruct('x')
+        def f(p):
+            n = lltype.cast_ptr_to_int(p)
+            return lltype.cast_int_to_ptr(lltype.Ptr(TP), n)
+
+        x = lltype.malloc(TP)
+        expected = lltype.cast_opaque_ptr(llmemory.GCREF, x)
+        assert self.interp_operations(f, [x]) == expected



More information about the Pypy-commit mailing list