Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
rihi committed Aug 8, 2024
1 parent 0ca6058 commit df82b62
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion decompiler/util/frozen_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ def __hash__(self):
hash_ ^= hash(pair)
self._hash = hash_

return self._hash
return self._hash
24 changes: 14 additions & 10 deletions tests/structures/pseudo/test_complextypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ def test_class_not_struct(self, class_book, book):
def book() -> Struct:
return Struct(
name="Book",
members=FrozenDict({
0: ComplexTypeMember(size=32, name="title", offset=0, type=Pointer(Integer.char())),
4: ComplexTypeMember(size=32, name="num_pages", offset=4, type=Integer.int32_t()),
8: ComplexTypeMember(size=32, name="author", offset=8, type=Pointer(Integer.char())),
}),
members=FrozenDict(
{
0: ComplexTypeMember(size=32, name="title", offset=0, type=Pointer(Integer.char())),
4: ComplexTypeMember(size=32, name="num_pages", offset=4, type=Integer.int32_t()),
8: ComplexTypeMember(size=32, name="author", offset=8, type=Pointer(Integer.char())),
}
),
size=96,
)

Expand All @@ -79,11 +81,13 @@ def book() -> Struct:
def class_book() -> Class:
return Class(
name="ClassBook",
members=FrozenDict({
0: ComplexTypeMember(size=32, name="title", offset=0, type=Pointer(Integer.char())),
4: ComplexTypeMember(size=32, name="num_pages", offset=4, type=Integer.int32_t()),
8: ComplexTypeMember(size=32, name="author", offset=8, type=Pointer(Integer.char())),
}),
members=FrozenDict(
{
0: ComplexTypeMember(size=32, name="title", offset=0, type=Pointer(Integer.char())),
4: ComplexTypeMember(size=32, name="num_pages", offset=4, type=Integer.int32_t()),
8: ComplexTypeMember(size=32, name="author", offset=8, type=Pointer(Integer.char())),
}
),
size=96,
)

Expand Down

0 comments on commit df82b62

Please sign in to comment.