aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-02-20 18:48:20 +0000
committerGravatar Peter McGoron 2023-02-20 18:48:20 +0000
commit5a09f481b3780bbac56da96601b4def6139bbb24 (patch)
tree1baa27ec5116ef63b0ce72d7df15e7b32c38a3e5 /asm
parentadd label parser that can deal with forward jumps; all tests pass (diff)
test many jumps
Diffstat (limited to 'asm')
-rw-r--r--asm/test.py19
1 files changed, 19 insertions, 0 deletions
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()
class='deletions'>-43/+68 2021-07-26exceptionsGravatar John Cowan 1-1/+15 2021-07-26new exampleGravatar John Cowan 1-1/+4 2021-07-26updatesGravatar John Cowan 1-2/+4 2021-07-26dtd always first argumentGravatar John Cowan 1-9/+9 2021-07-26DTO to DTDGravatar John Cowan 1-55/+52 2021-07-26typoGravatar John Cowan 1-1/+1 2021-07-26switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-26errorsGravatar John Cowan 1-1/+4 2021-07-26more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-26update preview linkGravatar John Cowan 1-1/+1 2021-07-26MN-W reviewGravatar John Cowan 1-6/+6 2021-07-26paired mutatorsGravatar John Cowan 1-43/+68 2021-07-25exceptionsGravatar John Cowan 1-1/+15 2021-07-25new exampleGravatar John Cowan 1-1/+4 2021-07-25updatesGravatar John Cowan 1-2/+4 2021-07-24dtd always first argumentGravatar John Cowan 1-9/+9 2021-07-23DTO to DTDGravatar John Cowan 1-55/+52 2021-07-22typoGravatar John Cowan 1-1/+1 2021-07-22switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-22errorsGravatar John Cowan 1-1/+4 2021-07-22more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-20update preview linkGravatar John Cowan 1-1/+1 2021-07-20MN-W reviewGravatar John Cowan 1-6/+6 2021-07-18Fix typo.Gravatar Arthur A. Gleckler 2-4/+4 2021-07-18Add <p> around abstract.Gravatar Arthur A. Gleckler 1-2/+2 2021-07-18Publish first draft.draft-1Gravatar Arthur A. Gleckler 3-0/+114 2021-07-18Ignore trailing whitespace.Gravatar Arthur A. Gleckler 11-129/+129 2021-07-18Ignore "Dictionaries.log".Gravatar Arthur A. Gleckler 1-1/+2 2021-07-18Fix errors reported by W3C HTML Validator.Gravatar Arthur A. Gleckler 1-27/+27 2021-07-18Eliminate unnecessary redirect by using TLS/SSL.Gravatar Arthur A. Gleckler 1-1/+1