diff options
| author | 2023-02-08 04:15:54 +0000 | |
|---|---|---|
| committer | 2023-02-08 04:15:54 +0000 | |
| commit | 606814c4c079fc51102d4aa69079bbfb67b6f4b0 (patch) | |
| tree | 5b93e620d5d3d2f88a4d3df81547553cc3c7701f /asm/test.py | |
| parent | move tests (diff) | |
python ffi: test parsing
Diffstat (limited to 'asm/test.py')
| -rw-r--r-- | asm/test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/asm/test.py b/asm/test.py index e86b508..dc07655 100644 --- a/asm/test.py +++ b/asm/test.py @@ -1,5 +1,6 @@ from creole import * import unittest +import ffi class ProgramTest(unittest.TestCase): def test_oneline(self): @@ -38,5 +39,12 @@ class ProgramTest(unittest.TestCase): b = p() self.assertEqual(b, b_ex) + def test_parse_reg(self): + p = Program() + p.parse_asm_line("push r5") + ins = ffi.parse_line(p()) + self.assertEqual(ins[0], instructions["push"].opcode) + self.assertEqual(ins[1][0], (1,5)) + if __name__ == "__main__": unittest.main() |
