An error in C++ and Java implementation of diff_cleanupSemantic
Closed this issue · 2 comments
GoogleCodeExporter commented
A pointer to the previous Diff is only assigned once and never advances.
Try to double delete/insert pair in the test for overlap elimination:
<del>abcxx</del><ins>xxdef</ins><del>abcxx</del><ins>xxdef</ins>
Original issue reported on code.google.com by snhere@gmail.com
on 14 Jan 2011 at 9:22
GoogleCodeExporter commented
Confirmed. Thank you! Wow, that's a rather embarrassing omission. It's also
a lesson that having 100% code coverage in tests is not a guarantee of
correctness.
All languages using linked lists of diffs are affected:
C++, Java
Languages which use indexed arrays of diffs are fine:
C#, JavaScript, Lua, Python, Objective C (not released yet)
For the record, the nature of this bug is non-critical. The output is
completely valid, though the output is non-optimal.
Corrections have been made to the offending languages, a new unit test has been
made for all languages, and the changes have been sent off for code review.
Expect it to land on Wednesday or Friday.
Original comment by neil.fra...@gmail.com
on 19 Jan 2011 at 2:42
- Changed state: Started
GoogleCodeExporter commented
New version has been uploaded. Thanks for catching this.
Original comment by neil.fra...@gmail.com
on 19 Jan 2011 at 9:37
- Changed state: Fixed