OLD | NEW |
| (Empty) |
1 Tests SegmentedRange | |
2 | |
3 Test case: one | |
4 Input Segments: [[0,1,"a"]] | |
5 Result: | |
6 0 - 1: a | |
7 Test case: two adjacent | |
8 Input Segments: [[0,1,"a"],[1,2,"a"]] | |
9 Result: | |
10 0 - 2: a | |
11 Test case: two apart | |
12 Input Segments: [[0,1,"a"],[2,3,"a"]] | |
13 Result: | |
14 0 - 1: a | |
15 2 - 3: a | |
16 Test case: two overlapping | |
17 Input Segments: [[0,2,"a"],[2,3,"a"]] | |
18 Result: | |
19 0 - 3: a | |
20 Test case: two overlapping no merge | |
21 Input Segments: [[0,2,"a"],[2,3,"b"]] | |
22 Result: | |
23 0 - 2: a | |
24 2 - 3: b | |
25 Test case: one inside another | |
26 Input Segments: [[0,3,"a"],[1,2,"a"]] | |
27 Result: | |
28 0 - 3: a | |
29 Test case: one inside another, no merge | |
30 Input Segments: [[0,3,"a"],[1,2,"b"]] | |
31 Result: | |
32 0 - 1: a | |
33 1 - 2: b | |
34 2 - 3: a | |
35 Result backwards: | |
36 0 - 3: a | |
37 Test case: one between two others | |
38 Input Segments: [[0,2,"a"],[3,5,"a"],[2,3,"a"]] | |
39 Result: | |
40 0 - 5: a | |
41 Test case: one between two others, no merge | |
42 Input Segments: [[0,2,"a"],[3,5,"b"],[2,3,"a"]] | |
43 Result: | |
44 0 - 2: a | |
45 2 - 3: a | |
46 3 - 5: b | |
47 Test case: one overlapping two others | |
48 Input Segments: [[0,2,"a"],[3,5,"a"],[1,4,"a"]] | |
49 Result: | |
50 0 - 5: a | |
51 Test case: one overlapping two others, no merge | |
52 Input Segments: [[0,2,"a"],[3,5,"b"],[1,4,"a"]] | |
53 Result: | |
54 0 - 1: a | |
55 1 - 4: a | |
56 4 - 5: b | |
57 Result backwards: | |
58 0 - 2: a | |
59 2 - 3: a | |
60 3 - 5: b | |
61 Test case: one consuming many: | |
62 Input Segments: [[0,1,"a"],[2,3,"a"],[4,5,"a"],[6,7,"a"],[2,6,"a"]] | |
63 Result: | |
64 0 - 1: a | |
65 2 - 7: a | |
66 Test case: one consuming many, no merge: | |
67 Input Segments: [[0,1,"a"],[2,3,"a"],[4,5,"a"],[6,7,"a"],[2,6,"a"]] | |
68 Result: | |
69 0 - 1: a | |
70 2 - 6: a | |
71 6 - 7: a | |
72 Result backwards: | |
73 0 - 1: a | |
74 2 - 3: a | |
75 3 - 4: a | |
76 4 - 5: a | |
77 5 - 6: a | |
78 6 - 7: a | |
79 | |
OLD | NEW |