From 7006bdf444f2b9533bcc3aee2933ba7ff8e70d2e Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Sun, 14 Oct 2018 21:37:09 -0400 Subject: Refactor to how symbols and namespaces work --- suite/testcommon.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'suite') 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]) -- cgit v1.3.1