Commits

Hakan Ardo  committed 3206e05

these should result in InvalidLoops

  • Participants
  • Parent commits 68e5f2f

Comments (0)

Files changed (2)

File pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py

 class TestLLtype(BaseTestOptimizeBasic, LLtypeMixin):
     pass
 
-    def test_issue1080_basic(self):
-        ops = """
-        []
-        p69 = same_as(ConstPtr(myptr))
-        quasiimmut_field(p69, descr=quasiimmutdescr)
-        guard_not_invalidated() []
-        p71 = getfield_gc(p69, descr=quasifielddescr) # inst_code
-        guard_value(p71, -4247) []
-        jump()
-        """
-        expected = """
-        []
-        p72 = getfield_gc(ConstPtr(myptr), descr=quasifielddescr)
-        guard_value(p72, -4247) []
-        jump()
-        """
-        self.optimize_loop(ops, expected)
-
-
-
 ##class TestOOtype(BaseTestOptimizeBasic, OOtypeMixin):
 
 ##    def test_instanceof(self):

File pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py

         setfield_gc(p106, p108, descr=nextdescr) # inst_storage
         jump(p106)
         """
-        expected = """
-        []
-        p72 = getfield_gc(ConstPtr(myptr2), descr=quasifielddescr)
-        guard_value(p72, -4247) []
-        jump()
-        """
-        self.optimize_loop(ops, expected)
+        py.test.raises(InvalidLoop, self.optimize_loop,
+                       ops, expected)
+        
 
     def test_issue1080_infinitie_loop_simple(self):
         ops = """
         guard_value(p72, -4247) []
         jump()
         """
-        self.optimize_loop(ops, expected)
+        py.test.raises(InvalidLoop, self.optimize_loop,
+                       ops, expected)
 
 class TestLLtype(OptimizeOptTest, LLtypeMixin):
     pass