Skip to content

Commit

Permalink
Reformat python files
Browse files Browse the repository at this point in the history
  • Loading branch information
R33v0LT committed Dec 24, 2024
1 parent 0b6655d commit a69e9d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions suite/auto-sync/src/autosync/cpptranslator/Tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ def test_fieldfrominstr(self):
syntax,
b"fieldFromInstruction_4(Val, 0, 4)",
)

syntax = b"static unsigned function(unsigned Insn) { return fieldFromInstruction(Insn, 6, 6); }"
self.check_patching_result(
patch,
syntax,
b"fieldFromInstruction_4(Insn, 6, 6)",
)
)

def test_getnumoperands(self):
patch = GetNumOperands(0)
Expand Down Expand Up @@ -620,8 +620,10 @@ def test_isuintn(self):
patch = IsUInt(0)
syntax = b"isUInt<RegUnitBits>(FirstRU);"
self.check_patching_result(patch, syntax, b"isUIntN(RegUnitBits, FirstRU)")

def test_badconditioncode(self):
patch = BadConditionCode(0)
syntax = b"return BadConditionCode(BRCC)"
self.check_patching_result(patch, syntax, b"CS_ASSERT(0 && \"Unknown condition code passed\");")
self.check_patching_result(
patch, syntax, b'CS_ASSERT(0 && "Unknown condition code passed");'
)
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def get_main_capture_name(self) -> str:
return "bad_condition_code"

def get_patch(self, captures: [(Node, str)], src: bytes, **kwargs) -> bytes:
return b"CS_ASSERT(0 && \"Unknown condition code passed\");"
return b'CS_ASSERT(0 && "Unknown condition code passed");'

0 comments on commit a69e9d1

Please sign in to comment.