diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-12-13 21:38:11 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-12-13 21:38:11 (GMT) |
commit | 0c6e15aa59918b7d3a1e63258e3f6792266d62e0 (patch) | |
tree | 385321b7134eb866ce20d924ced364685b57488b /tests | |
parent | c806bc75910c129c6d78115cfdc571316e060412 (diff) |
Provided a representation for constant values imported from C code.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/constval.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/constval.py b/tests/constval.py new file mode 100644 index 0000000..4863d39 --- /dev/null +++ b/tests/constval.py @@ -0,0 +1,22 @@ +#!/usr/bin/python3-dbg +# -*- coding: utf-8 -*- + + +from chrysacase import ChrysalideTestCase +from pychrysalide import PyConstvalObject +from pychrysalide.arch import ArchInstruction + + +class TestConstVal(ChrysalideTestCase): + """TestCase for PyConstvalObject.""" + + + def testGI(self): + """Validate the PyConstvalObject implementation.""" + + with self.assertRaises(RuntimeError): + cv = PyConstvalObject() + + self.assertEqual(ArchInstruction.ILT_JUMP, 1) + + self.assertEqual(str(ArchInstruction.ILT_JUMP), 'ILT_JUMP') |