diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-11-24 10:50:18 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-11-24 10:50:18 (GMT) |
commit | f2ac79dbf64c8604095737ef4e809a25ad63eacb (patch) | |
tree | 7c46bad39a38d4ff1a420f51295361b15b6a896e /tests | |
parent | f58a0e41b2c7266f5e6b521485a9d62246efbb6d (diff) |
Fix the test suite.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/format/program.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/format/program.py b/tests/format/program.py index 7a649b8..7027cdf 100644 --- a/tests/format/program.py +++ b/tests/format/program.py @@ -1,6 +1,7 @@ from chrysacase import ChrysalideTestCase from pychrysalide import SourceEndian +from pychrysalide.analysis.contents import MemoryContent #from pychrysalide.arch import vmpa, mrange from pychrysalide.format import ProgramFormat #from pychrysalide.format import BinSymbol @@ -17,12 +18,16 @@ class TestProgramFormat(ChrysalideTestCase): def testCustomInstance(self): """Validate a full custom ProgramFormat implementation.""" + data = b'\x00\x00\x00\xef' + cnt = MemoryContent(data) + + class CustomFormat(ProgramFormat): def _get_endianness(self): return SourceEndian.BIG - cf = CustomFormat() + cf = CustomFormat(cnt) self.assertEqual(cf.endianness, SourceEndian.BIG) @@ -30,7 +35,7 @@ class TestProgramFormat(ChrysalideTestCase): class EmptyCustomFormat(ProgramFormat): pass - cf = EmptyCustomFormat() + cf = EmptyCustomFormat(cnt) self.assertEqual(cf.endianness, SourceEndian.LITTLE) |