summaryrefslogtreecommitdiff
path: root/tests/constval.py
blob: 4863d39096f9c12f2cf58e3ab4766893d449af9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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')