From 45bd3537e5e082e01d1df88585fc2e6c691b1d1d Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Thu, 16 Jun 2022 18:23:22 -0400 Subject: Unit test for function type and Win32 x86 calling conventions --- suite/testcommon.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'suite/testcommon.py') diff --git a/suite/testcommon.py b/suite/testcommon.py index 99e9c6b9..db0c79de 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -359,6 +359,15 @@ class BinaryViewTestBuilder(Builder): retinfo.append(f"Function: {func.start:x} Instruction: {hlilins.address:x} HLIL->MLILS instruction: {str(sorted(list(map(str, hlilins.mlils))))}") return retinfo + def test_function_type(self): + """Function types don't match""" + retinfo = [] + for func in self.bv.functions: + if func.hlil is None or func.hlil.root is None: + continue + retinfo.append(f"Function: {func.start:x} Type: {func.function_type}") + return retinfo + def test_functions_attributes(self): """Function attributes don't match""" funcinfo = [] -- cgit v1.3.1