From c3362d1ffb2c581c0647a1e9f480b98e7976fe25 Mon Sep 17 00:00:00 2001 From: Jon Palmisciano Date: Mon, 18 Jul 2022 16:00:40 -0400 Subject: Temporarily disable Objective-C unit test, update test binaries submodule --- suite/api_test.py | 80 +++++++++++++++++++++++++++---------------------------- suite/binaries | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/suite/api_test.py b/suite/api_test.py index a6081ecb..58cd664e 100644 --- a/suite/api_test.py +++ b/suite/api_test.py @@ -3427,43 +3427,43 @@ class LowLevelILTests(TestWithBinaryView): self.do_il_expression_test(LowLevelILFunction.float_compare_unordered, [8], LowLevelILFcmpUo, const_args=2) -class TestObjectiveCPlugin(unittest.TestCase): - def setUp(self): - with FileApparatus("calculator_macOS12_arm64e") as path: - bv = BinaryViewType.get_view_of_file_with_options( - os.path.relpath(path), - options={"workflows.enable": True, "workflows.functionWorkflow": "core.function.objectiveC"} - ) - bv.update_analysis_and_wait() - - self.bv: BinaryView = bv - self.arch: Architecture = self.bv.arch - self.plat: Platform = self.bv.platform - - def test_function_nat(self): - f = self.bv.get_function_at(0x10000667c) - ft = f.function_type - - # Ensure return value and parameter types are being set - assert "CGFloat" == str(ft.return_value) - assert len(ft.parameters) >= 2 - assert "SEL" in str(ft.parameters[1]) - - # Ensure function names are being set - assert "doubleValue" in f.name - - def test_data_vars_created(self): - dv1 = self.bv.get_data_var_at(0x1000331a0) - dv2 = self.bv.get_data_var_at(0x10001f4b0) - - # Ensure data variables are being created - assert "class" in str(dv1.type) - assert "method" in str(dv2.type) - - def test_method_call_resolution(self): - f = self.bv.get_function_at(0x10000667c) - assert f - - # Lazier way of checking that the method call rewriting worked - assert "actualValuePeriodDecimal" in str(f.hlil) - assert "doubleValue" in str(f.hlil) +# class TestObjectiveCPlugin(unittest.TestCase): +# def setUp(self): +# with FileApparatus("calculator_macOS12_arm64e") as path: +# bv = BinaryViewType.get_view_of_file_with_options( +# os.path.relpath(path), +# options={"workflows.enable": True, "workflows.functionWorkflow": "core.function.objectiveC"} +# ) +# bv.update_analysis_and_wait() + +# self.bv: BinaryView = bv +# self.arch: Architecture = self.bv.arch +# self.plat: Platform = self.bv.platform + +# def test_function_nat(self): +# f = self.bv.get_function_at(0x10000667c) +# ft = f.function_type + +# # Ensure return value and parameter types are being set +# assert "CGFloat" == str(ft.return_value) +# assert len(ft.parameters) >= 2 +# assert "SEL" in str(ft.parameters[1]) + +# # Ensure function names are being set +# assert "doubleValue" in f.name + +# def test_data_vars_created(self): +# dv1 = self.bv.get_data_var_at(0x1000331a0) +# dv2 = self.bv.get_data_var_at(0x10001f4b0) + +# # Ensure data variables are being created +# assert "class" in str(dv1.type) +# assert "method" in str(dv2.type) + +# def test_method_call_resolution(self): +# f = self.bv.get_function_at(0x10000667c) +# assert f + +# # Lazier way of checking that the method call rewriting worked +# assert "actualValuePeriodDecimal" in str(f.hlil) +# assert "doubleValue" in str(f.hlil) diff --git a/suite/binaries b/suite/binaries index 51c213c3..40f5dc32 160000 --- a/suite/binaries +++ b/suite/binaries @@ -1 +1 @@ -Subproject commit 51c213c395fa622793c262104b8319a55753b83b +Subproject commit 40f5dc3269a68638ab9f0b7f352ff8233f2f0882 -- cgit v1.3.1