(self)
| 352 | self.assertEqual(uops[2], "_TIER2_RESUME_CHECK") |
| 353 | |
| 354 | def test_jump_forward(self): |
| 355 | def testfunc(n): |
| 356 | a = 0 |
| 357 | while a < n: |
| 358 | if a < 0: |
| 359 | a = -a |
| 360 | else: |
| 361 | a = +a |
| 362 | a += 1 |
| 363 | return a |
| 364 | |
| 365 | testfunc(TIER2_THRESHOLD) |
| 366 | |
| 367 | ex = get_first_executor(testfunc) |
| 368 | self.assertIsNotNone(ex) |
| 369 | uops = get_opnames(ex) |
| 370 | # Since there is no JUMP_FORWARD instruction, |
| 371 | # look for indirect evidence: the += operator |
| 372 | self.assertIn("_BINARY_OP_ADD_INT", uops) |
| 373 | |
| 374 | def test_for_iter_range(self): |
| 375 | def testfunc(n): |
nothing calls this directly
no test coverage detected