Generate better diff data for interdiff tests.
Review Request #8830 — Created March 20, 2017 and submitted
The interdiff tests were making use of sample diff data that was mostly incomplete. They didn't include the entirety of the inserts/deletes for the diffs, or the trailing context. This was fine originally, but the interdiff algorithms eventually made use of more of the data in the diffs. Upcoming interdiff fixes need this data even more. This backports some of the fixes from my interdiff fixing branch to generate proper diffs. Callers now give a range for a hunk in a diff, and get back a diff that fulfills those values properly. We can use this in all the interdiff tests going forward. Some of the existing diffs had ranges that assumed no trailing context, and had to be adjusted accordingly. I've tried to test and ensure that each call passes proper ranges now, but there may be some that we'll want to tweak and adjust going forward to be more correct.
Unit tests pass.
- Change Summary:
-
Fixed a couple of tests to better match my expectations. One (the "many ignorable ranges" test) is still incorrect (we shouldn't be nuking the lines of context following the change), but that will be rectified in an upcoming fix, as I've discovered bugs we have that lead to diff range issues.
- Commit:
-
a1cae38744465487626f656db3e189c3f7d6b5a40b8fd03b8f50a3edcd2261f7b44a56afcf955d12
- Diff:
-
Revision 2 (+108 -106)