summaryrefslogtreecommitdiff
path: root/tests/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-01-04 18:50:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-01-04 18:50:07 (GMT)
commitb9fe3a839e9212b809d64c11bf92b703adb18fb2 (patch)
tree86a1c42f305265372bb4d697dad9c99f2ea3715a /tests/arch
parent0b2cada60941d109bde2f54a198f4c3a799e0606 (diff)
Updated the test suite for the current API.
Diffstat (limited to 'tests/arch')
-rw-r--r--tests/arch/errors.py7
-rw-r--r--tests/arch/immediate.py8
-rw-r--r--tests/arch/processor.py5
3 files changed, 12 insertions, 8 deletions
diff --git a/tests/arch/errors.py b/tests/arch/errors.py
index 9d5e273..8affb77 100644
--- a/tests/arch/errors.py
+++ b/tests/arch/errors.py
@@ -26,7 +26,12 @@ class TestArchErrors(ChrysalideTestCase):
pattern.append([ArchProcessor.APE_LABEL, addr, 'random desc #%d' % i])
- proc = ArchProcessor()
+
+ class NewProc(ArchProcessor):
+ pass
+
+
+ proc = NewProc()
for i in range(errlen):
diff --git a/tests/arch/immediate.py b/tests/arch/immediate.py
index b3ddc6d..74b8069 100644
--- a/tests/arch/immediate.py
+++ b/tests/arch/immediate.py
@@ -13,7 +13,7 @@ class TestImmediate(ChrysalideTestCase):
"""TestCase for arch.ImmOperand."""
- def validateValue(self, value, size, padding, syntax, strings):
+ def validateValue(self, value, size, padding, strings):
"""Check all kinds of things with a given immediate operand."""
display = [
@@ -32,7 +32,7 @@ class TestImmediate(ChrysalideTestCase):
op.padding = padding
op.display = d
- string = op.to_string(syntax)
+ string = op.to_string()
self.assertEqual(string, strings[d])
@@ -46,7 +46,7 @@ class TestImmediate(ChrysalideTestCase):
ImmOperand.IOD_HEX: '0x1'
}
- self.validateValue(1, arch.MDS_8_BITS_UNSIGNED, False, arch.ASX_INTEL, strings)
+ self.validateValue(1, arch.MDS_8_BITS_UNSIGNED, False, strings)
def testByteOnePadded(self):
@@ -59,4 +59,4 @@ class TestImmediate(ChrysalideTestCase):
ImmOperand.IOD_HEX: '0x01'
}
- self.validateValue(1, arch.MDS_8_BITS_UNSIGNED, True, arch.ASX_INTEL, strings)
+ self.validateValue(1, arch.MDS_8_BITS_UNSIGNED, True, strings)
diff --git a/tests/arch/processor.py b/tests/arch/processor.py
index 5ad6490..97a713d 100644
--- a/tests/arch/processor.py
+++ b/tests/arch/processor.py
@@ -16,7 +16,6 @@ class TestProcessor(ChrysalideTestCase):
"""TestCase for arch.ArchProcessor."""
-
def testGI(self):
"""Validate the GObject introspection."""
@@ -27,7 +26,7 @@ class TestProcessor(ChrysalideTestCase):
class NewContext(ProcContext):
pass
- class NewProc(ArchProcessor):
+ class NewProcWithCtx(ArchProcessor):
def _get_context(self):
return NewContext()
@@ -36,7 +35,7 @@ class TestProcessor(ChrysalideTestCase):
return None
- np = NewProc()
+ np = NewProcWithCtx()
data = b'\x01\x02\x03\x04'
cnt = MemoryContent(data)