view tests/test-bdiff.py.out @ 22717:b89f7e3a414d

spanset: enforce the order lazily to gain `fastasc` and `fastdesc` methods Instead of having the direction of iteration enforced through the ordering of `start` and `end` attributes of spanset, we encode the iteration direction in an explicit attribute and always store start < end. The logic for sort and reverse has to be updated. The __iter__ is now based on the newly introduced `fastasc` and `fastdesc` methods. This will allow other code simplifications in the future.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 02 Oct 2014 18:02:17 -0500
parents eeac5e179243
children 9a8363d23419
line wrap: on
line source

*** 'a\nc\n\n\n\n' 'a\nb\n\n\n'
*** 'a\nb\nc\n' 'a\nc\n'
*** '' ''
*** 'a\nb\nc' 'a\nb\nc'
*** 'a\nb\nc\nd\n' 'a\nd\n'
*** 'a\nb\nc\nd\n' 'a\nc\ne\n'
*** 'a\nb\nc\n' 'a\nc\n'
*** 'a\n' 'c\na\nb\n'
*** 'a\n' ''
*** 'a\n' 'b\nc\n'
*** 'a\n' 'c\na\n'
*** '' 'adjfkjdjksdhfksj'
*** '' 'ab'
*** '' 'abc'
*** 'a' 'a'
*** 'ab' 'ab'
*** 'abc' 'abc'
*** 'a\n' 'a\n'
*** 'a\nb' 'a\nb'
6 6 'y\n\n'
6 6 'y\n\n'
9 9 'y\n\n'
done
done