Commit 5d5bf632 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a18c7fc5
...@@ -64,9 +64,33 @@ func TestRangeSet(t *testing.T) { ...@@ -64,9 +64,33 @@ func TestRangeSet(t *testing.T) {
S(1,2), // U S(1,2), // U
S()), // D S()), // D
// XXX Add -> merge // adjacent [1,3) [3,5)
// XXX Del -> split E(
// XXX several ranges -> Del(-oo, oo) -> ø S(1,3), // A
S(3,5), // B
S(1,5), // U
S(1,3)), // D
// overlapping [1,3) [2,4)
E(
S(1,3), // A
S(2,4), // B
S(1,4), // U
S(1,2)), // D
// [1,7) \ [3,5) -> [1,3) [5,7)
E(
S(1,7), // A
S(3,5), // B
S(1,7),
S(1,3, 5,7)),
// several ranges \ [-∞, ∞) -> ø
E(
S(1,3, 5,7, 11,100), // A
S(noo, oo), // B
S(1,3, 5,7, 11,100), // U
S()), // D
} }
for _, tt := range testv { for _, tt := range testv {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment