| 92 | } |
| 93 | |
| 94 | int main(int argc, char *argv[]) |
| 95 | { |
| 96 | struct seeker *seeker = tal(NULL, struct seeker); |
| 97 | |
| 98 | common_setup(argv[0]); |
| 99 | |
| 100 | seeker->daemon = tal(seeker, struct daemon); |
| 101 | |
| 102 | /* Case where we start at beginning */ |
| 103 | test_block_range(seeker, 100, |
| 104 | 0, 0, |
| 105 | 1, 2, |
| 106 | 3, 6, |
| 107 | 7, 14, |
| 108 | 15, 30, |
| 109 | 31, 62, |
| 110 | 63, 100, |
| 111 | -1); |
| 112 | |
| 113 | /* Case where we start at end */ |
| 114 | test_block_range(seeker, 100, |
| 115 | 100, 100, |
| 116 | 98, 99, |
| 117 | 94, 97, |
| 118 | 86, 93, |
| 119 | 70, 85, |
| 120 | 38, 69, |
| 121 | 0, 37, |
| 122 | -1); |
| 123 | |
| 124 | /* Start in the middle. */ |
| 125 | test_block_range(seeker, 100, |
| 126 | 50, 59, |
| 127 | 30, 49, |
| 128 | 0, 29, |
| 129 | 60, 100, |
| 130 | -1); |
| 131 | |
| 132 | tal_free(seeker); |
| 133 | common_shutdown(); |
| 134 | } |
nothing calls this directly
no test coverage detected