From 5a09f481b3780bbac56da96601b4def6139bbb24 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Mon, 20 Feb 2023 18:48:20 +0000 Subject: [PATCH] test many jumps --- asm/test.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/asm/test.py b/asm/test.py index cae3d36..4ab05e6 100644 --- a/asm/test.py +++ b/asm/test.py @@ -370,6 +370,25 @@ class LabelTest(unittest.TestCase): self.assertEqual(ex.getreg(1), 50) self.assertEqual(ex.getreg(2), 50*50) + def test_many_jumps(self): + p = Program() + p.parse_lines([ + "j .f1", + ".f4", + "j .f5", + ".f2", + "j .f3", + ".f3", + "j .f4", + ".f5", + "j .f6", + ".f1", + "j .f2", + ".f6" + ]) + ex = ffi.Environment(p()) + self.assertEqual(ex(), ffi.RunRet.STOP) + class ProgramTest(unittest.TestCase): def test_exec_simple_reg(self): p = Program()