Skip to content

Commit

Permalink
Added failing test case for nested casts
Browse files Browse the repository at this point in the history
  • Loading branch information
d0c-s4vage committed Jan 19, 2020
1 parent 8fb203e commit a2c4b33
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ def test_cast_from_dex(self):
stdout="10,896",
)

def test_nested_casts(self):
dom = self._test_parse_build(
"",
"""
local ubyte a_byte = 0x99;
local ushort a_short = 0x88ff;
local uint a_int = 0x1234ffff;
local int final = (uint)(a_int + a_short + (ushort)(a_byte << 4));
Printf("%u", final);
""",
stdout="305498510", # taken directly from 010 editor
)


if __name__ == "__main__":
unittest.main()

0 comments on commit a2c4b33

Please sign in to comment.