From: Jacob Lifshay Date: Thu, 3 Sep 2020 23:01:43 +0000 (-0700) Subject: python tests pass X-Git-Tag: v0.2.0~25 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a69135d85e17fc46999c4a00e9ecb5d9a00c382;p=power-instruction-analyzer.git python tests pass --- diff --git a/tests/test_power_instruction_analyzer.py b/tests/test_power_instruction_analyzer.py index 15b3854..1fc97a6 100644 --- a/tests/test_power_instruction_analyzer.py +++ b/tests/test_power_instruction_analyzer.py @@ -140,7 +140,7 @@ class TestConditionRegister(unittest.TestCase): class TestInstructionInput(unittest.TestCase): def test_text_signature(self): self.assertEqual(pia.InstructionInput.__text_signature__, - "(ra, rb, rc)") + "(ra=None, rb=None, rc=None, carry=None, overflow=None)") def test_fields(self): v = pia.InstructionInput(ra=123, rb=456, rc=789) @@ -159,7 +159,7 @@ class TestInstructionInput(unittest.TestCase): self.assertEqual(str(v), '{"ra":"0x7B","rb":"0x1C8","rc":"0x315"}') self.assertEqual(repr(v), - "InstructionInput(ra=123, rb=456, rc=789)") + "InstructionInput(ra=123, rb=456, rc=789, carry=None, overflow=None)") class TestInstructionOutput(unittest.TestCase): @@ -222,7 +222,10 @@ class TestInstructionOutput(unittest.TestCase): class TestDivInstrs(unittest.TestCase): def test(self): - v = pia.InstructionInput(ra=0x1234, rb=0x56, rc=0x789) + v = pia.InstructionInput( + ra=0x1234, rb=0x56, rc=0x789, + overflow=pia.OverflowFlags(so=False, ov=True, ov32=True), + carry=pia.CarryFlags(ca=True, ca32=False)) for instr in pia.INSTRS: with self.subTest(instr=instr): fn_name = instr.replace(".", "_")