summaryrefslogtreecommitdiff
path: root/suite
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-10-14 21:37:09 -0400
committerPeter LaFosse <peter@vector35.com>2018-10-15 23:18:23 -0400
commit7006bdf444f2b9533bcc3aee2933ba7ff8e70d2e (patch)
treed4af914aa4b4ebad400106a278a7ed6791a66ff4 /suite
parent50b3ff664665a6186d6d82364a0845d544ec8fac (diff)
Refactor to how symbols and namespaces work
Diffstat (limited to 'suite')
-rw-r--r--suite/testcommon.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/suite/testcommon.py b/suite/testcommon.py
index 22534600..497e85c4 100644
--- a/suite/testcommon.py
+++ b/suite/testcommon.py
@@ -117,7 +117,7 @@ class BinaryViewTestBuilder(Builder):
"""Function.symbol.name list doesnt match"""
result = []
for x in self.bv.functions:
- result.append("Symbol: " + x.symbol.name + ' ' + str(x.symbol.type) + ' ' + hex(x.symbol.address))
+ result.append("Symbol: " + x.symbol.name + ' ' + str(x.symbol.type) + ' ' + hex(x.symbol.address) + ' ' + str(x.symbol.namespace))
return fixOutput(result)
def test_function_can_return(self):
@@ -158,6 +158,14 @@ class BinaryViewTestBuilder(Builder):
"""Symbols list doesn't match"""
return ["Symbol: " + str(i) for i in sorted(self.bv.symbols)]
+ def test_symbol_namespaces(self):
+ """Symbol namespaces don't match"""
+ return self.bv.namespaces
+
+ def test_internal_external_namespaces(self):
+ """Symbol namespaces don't match"""
+ return [BinaryView.internal_namespace(), BinaryView.external_namespace()]
+
def test_strings(self):
"""Strings list doesn't match"""
return fixOutput(["String: " + str(x.value) + ' type: ' + str(x.type) + ' at: ' + hex(x.start) for x in self.bv.strings])