diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arch/errors.py | 13 | ||||
-rw-r--r-- | tests/arch/processor.py | 13 |
2 files changed, 24 insertions, 2 deletions
diff --git a/tests/arch/errors.py b/tests/arch/errors.py index 8affb77..e57b94b 100644 --- a/tests/arch/errors.py +++ b/tests/arch/errors.py @@ -6,6 +6,7 @@ from chrysacase import ChrysalideTestCase +from pychrysalide import arch from pychrysalide.arch import vmpa from pychrysalide.arch import ArchProcessor @@ -28,7 +29,17 @@ class TestArchErrors(ChrysalideTestCase): class NewProc(ArchProcessor): - pass + + def __init__(self): + + props = { + 'endianness': arch.SRE_LITTLE, + 'mem_size': arch.MDS_32_BITS_UNSIGNED, + 'ins_min_size': arch.MDS_32_BITS_UNSIGNED, + 'vspace': False + } + + super(NewProc, self).__init__(**props) proc = NewProc() diff --git a/tests/arch/processor.py b/tests/arch/processor.py index 97a713d..bf17b98 100644 --- a/tests/arch/processor.py +++ b/tests/arch/processor.py @@ -5,13 +5,13 @@ import pychrysalide from chrysacase import ChrysalideTestCase from pychrysalide.analysis.contents import MemoryContent +from pychrysalide import arch from pychrysalide.arch import ArchProcessor from pychrysalide.arch import ProcContext from pychrysalide.arch import vmpa from pychrysalide.format import FlatFormat - class TestProcessor(ChrysalideTestCase): """TestCase for arch.ArchProcessor.""" @@ -28,6 +28,17 @@ class TestProcessor(ChrysalideTestCase): class NewProcWithCtx(ArchProcessor): + def __init__(self): + + props = { + 'endianness': arch.SRE_LITTLE, + 'mem_size': arch.MDS_32_BITS_UNSIGNED, + 'ins_min_size': arch.MDS_32_BITS_UNSIGNED, + 'vspace': False + } + + super(NewProcWithCtx, self).__init__(**props) + def _get_context(self): return NewContext() |