Add o6/f test case and fix method annotation ordering in Smali parser #192
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the
o6/fclass test case forbafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqqDEX file to the parseDexAgainstSmaliMacro test suite.Changes
Added test case:
{ smaliFilePath: 'o6/f', isolate: true }to the test array for the target DEX fileFixed method annotation sorting in Smali parser: The existing lexicographic sort was using
localeCompare()which is locale-aware and incorrectly orders method names (e.g., treating 'H' > 'd' in some locales). Changed to use direct code point comparison (<operator) to match the DEX file format specification, which uses byte-by-byte comparison for sorting method IDs in the method_id table.The
o6/fclass test revealed this bug - the Smali parser was producing method annotations in order 'd, H, p' (due to locale-aware sorting) while the DEX file correctly had them as 'H, d, p' (code point order where 'H'=72 < 'd'=100).bafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqq+o6/fparseDexAgainstSmaliMacro test like others and make it pass #191Original prompt
bafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqq+o6/fparseDexAgainstSmaliMacro test like others and make it pass #191💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.