| 116 | } |
| 117 | |
| 118 | int main(int argc, char *argv[]) |
| 119 | { |
| 120 | struct seeker *seeker = tal(NULL, struct seeker); |
| 121 | |
| 122 | common_setup(argv[0]); |
| 123 | |
| 124 | seeker->daemon = tal(seeker, struct daemon); |
| 125 | |
| 126 | /* Case where we start at beginning */ |
| 127 | test_block_range(seeker, 100, |
| 128 | 0, 0, |
| 129 | 1, 2, |
| 130 | 3, 6, |
| 131 | 7, 14, |
| 132 | 15, 30, |
| 133 | 31, 62, |
| 134 | 63, 100, |
| 135 | -1); |
| 136 | |
| 137 | /* Case where we start at end */ |
| 138 | test_block_range(seeker, 100, |
| 139 | 100, 100, |
| 140 | 98, 99, |
| 141 | 94, 97, |
| 142 | 86, 93, |
| 143 | 70, 85, |
| 144 | 38, 69, |
| 145 | 0, 37, |
| 146 | -1); |
| 147 | |
| 148 | /* Start in the middle. */ |
| 149 | test_block_range(seeker, 100, |
| 150 | 50, 59, |
| 151 | 30, 49, |
| 152 | 0, 29, |
| 153 | 60, 100, |
| 154 | -1); |
| 155 | |
| 156 | tal_free(seeker); |
| 157 | common_shutdown(); |
| 158 | } |
nothing calls this directly
no test coverage detected