[pypy-svn] r72214 - pypy/branch/arraycopy/pypy/jit/metainterp/test

fijal at codespeak.net fijal at codespeak.net
Sun Mar 14 03:11:14 CET 2010


Author: fijal
Date: Sun Mar 14 03:11:12 2010
New Revision: 72214

Modified:
   pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
Write down a test for optimizeopt


Modified: pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py	(original)
+++ pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py	Sun Mar 14 03:11:12 2010
@@ -2724,7 +2724,20 @@
         self.optimize_loop(ops, 'Not, Not', expected)
 
     def test_arraycopy_1(self):
-        pass
+        ops = '''
+        [i0]
+        p1 = new_array(3, descr=arraydescr)
+        setarrayitem_gc(p1, 1, 1, descr=arraydescr)
+        p2 = new_array(3, descr=arraydescr)
+        arraycopy(ConstPtr(myptr), ConstPtr(myptr), p1, p2, 1, 1, 2, descr=arraydescr)
+        i2 = getarrayitem_gc(p2, 1, descr=arraydescr)
+        jump(i2)
+        '''
+        expected = '''
+        [i0]
+        jump(1)
+        '''
+        self.optimize_loop(ops, 'Not', expected)
 
 class TestOOtype(BaseTestOptimizeOpt, OOtypeMixin):
 



More information about the Pypy-commit mailing list