binary_function_similarity
binary_function_similarity copied to clipboard
The test code may have a little problem when using assertDictEqual
In IDA_scripts' test code, like test_large_acfg_disasm.py
in IDA_acfg_disasm, the code uses assertDictEqual
to test if the data feature that readers reproduce is the same as gt's.
However, assertDictEqual
will think {'a': [[2, 3], [3, 2]]} != {'a': [[3, 2], [2, 3]]}
. But when we reproduce the data feature, like ACFG's edge, we may get different orders of edges, which is also correct.
This is not a big problem, I just hope that the person replicating the code will be aware of this when the test fails.
Thanks @LJianCode for reporting this issue. This needs to be fixed.