From: Luke Kenneth Casson Leighton Date: Mon, 10 May 2021 17:00:47 +0000 (+0100) Subject: test_maxint, add zero onto 0xffffffffffffff X-Git-Tag: 0.0.3~60 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c20374ef3fc39674718eea1daa6fdc6cb346d984;p=openpower-isa.git test_maxint, add zero onto 0xffffffffffffff --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index 2afe50e6..1481f289 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -555,6 +555,12 @@ class SelectableIntTestCase(unittest.TestCase): self.assertTrue(a != b) self.assertFalse(a == b) + def test_maxint(self): + a = SelectableInt(0xffffffffffffffff, bits=64) + b = SelectableInt(0, bits=64) + result = a + b + self.assertTrue(result.value == 0xffffffffffffffff) + if __name__ == "__main__": unittest.main()