From 67a3f3652aa8ed86cf15b362e45cad542a64d62b Mon Sep 17 00:00:00 2001 From: Wyatt <53830972+whyitfor@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:30:58 -0500 Subject: [PATCH] Update more Instruction test instances --- .../arm32/test_arm32_instruction_modifier.py | 3 --- ofrak_core/test_ofrak/unit/resource_view/test_view.py | 9 ++------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ofrak_core/test_ofrak/unit/instruction_modifier/arm32/test_arm32_instruction_modifier.py b/ofrak_core/test_ofrak/unit/instruction_modifier/arm32/test_arm32_instruction_modifier.py index ffe775682..50e82d9b5 100644 --- a/ofrak_core/test_ofrak/unit/instruction_modifier/arm32/test_arm32_instruction_modifier.py +++ b/ofrak_core/test_ofrak/unit/instruction_modifier/arm32/test_arm32_instruction_modifier.py @@ -25,7 +25,6 @@ (Instruction,), ( AttributesType[Instruction]( - "ldrsh.w r3, [r7,#0x1C]", "ldrsh.w", "r3, [r7,#0x1C]", InstructionSetMode.NONE, @@ -55,7 +54,6 @@ (Instruction,), ( AttributesType[Instruction]( - "add r2, r3, 1", "add", "r2, r3, 1", InstructionSetMode.THUMB, @@ -85,7 +83,6 @@ (Instruction,), ( AttributesType[Instruction]( - "add r2, r3, 1", "add", "r2, r3, 1", InstructionSetMode.NONE, diff --git a/ofrak_core/test_ofrak/unit/resource_view/test_view.py b/ofrak_core/test_ofrak/unit/resource_view/test_view.py index 665524b43..4ab5178b9 100644 --- a/ofrak_core/test_ofrak/unit/resource_view/test_view.py +++ b/ofrak_core/test_ofrak/unit/resource_view/test_view.py @@ -52,7 +52,6 @@ def mock_instruction(): 0x4, ), AttributesType[Instruction]( - "add r1, r2, r3", "add", "r1, r2, r3", InstructionSetMode.NONE, @@ -67,7 +66,6 @@ def mock_instruction_view(): return Instruction( 0x100, 0x4, - "add r1, r2, r3", "add", "r1, r2, r3", InstructionSetMode.NONE, @@ -212,7 +210,6 @@ async def test_AttributesType(): # With a type parameter, the constructor of an actual attribute is used _ = AttributesType[Instruction]( - "add r1, r2, r3", "add", "r1, r2, r3", InstructionSetMode.NONE, @@ -232,7 +229,7 @@ async def instr_view(ofrak_context: OFRAKContext): b"\x00" * 4, (Instruction,), ) - instr_r.add_view(Instruction(0x100, 0x4, "", "", "", InstructionSetMode.NONE)) + instr_r.add_view(Instruction(0x100, 0x4, "", "", InstructionSetMode.NONE)) instr_r.add_attributes( ProgramAttributes( InstructionSet.ARM, @@ -268,9 +265,7 @@ async def test_modifier_updates_view(instr_view: Instruction): async def test_save_updates_view(instr_view: Instruction): - instr_view.resource.add_view( - Instruction(0x100, 0x4, "sub r4, r5", "sub", "r4, r5", InstructionSetMode.NONE) - ) + instr_view.resource.add_view(Instruction(0x100, 0x4, "sub", "r4, r5", InstructionSetMode.NONE)) await instr_view.resource.save() assert instr_view.mnemonic == "sub"