summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/format/symbol.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/format/symbol.py b/tests/format/symbol.py
new file mode 100644
index 0000000..c720256
--- /dev/null
+++ b/tests/format/symbol.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python3-dbg
+# -*- coding: utf-8 -*-
+
+
+# Tests pour valider la gestion des symboles
+
+
+from chrysacase import ChrysalideTestCase
+from pychrysalide.arch import vmpa, mrange
+from pychrysalide.format import BinSymbol
+
+
+class TestBinarySymbols(ChrysalideTestCase):
+ """TestCase for format.BinSymbol."""
+
+
+ def testSymbolDefaultStatus(self):
+ """Validate the default status for symbols."""
+
+ saddr = vmpa(0x10, vmpa.VMPA_NO_VIRTUAL)
+ srange = mrange(saddr, 0x3)
+ symbol = BinSymbol(BinSymbol.STP_ENTRY_POINT, srange)
+
+ self.assertEqual(symbol.status, BinSymbol.SymbolStatus.INTERNAL)
+
+ self.assertEqual(str(symbol.status), 'SymbolStatus.INTERNAL')