| 161 | } |
| 162 | } |
| 163 | int main(int argc, char **argv) |
| 164 | { |
| 165 | if (config().parseOptions(argc, argv)) |
| 166 | { |
| 167 | return EXIT_FAILURE; |
| 168 | } |
| 169 | test_point_within({0, 0, 1, 1}, {0, 0}, true); |
| 170 | |
| 171 | test_point_within({0, 0, 3, 3}, {1, 0}, true); |
| 172 | test_point_within({0, 0, 3, 3}, {2, 1}, true); |
| 173 | test_point_within({0, 0, 3, 3}, {2, 2}, true); |
| 174 | test_point_within({0, 0, 3, 3}, {1, 2}, true); |
| 175 | |
| 176 | test_point_within({0, 0, 1, 1}, {1, 1}, false); |
| 177 | test_point_within({0, 0, 1, 1}, {0, 1}, false); |
| 178 | test_point_within({0, 0, 1, 1}, {-1, 1}, false); |
| 179 | test_point_within({0, 0, 1, 1}, {-1, 0}, false); |
| 180 | test_point_within({0, 0, 1, 1}, {-1, -1}, false); |
| 181 | test_point_within({0, 0, 1, 1}, {0, -1}, false); |
| 182 | test_point_within({0, 0, 1, 1}, {1, -1}, false); |
| 183 | test_point_within({0, 0, 1, 1}, {1, 0}, false); |
| 184 | |
| 185 | test_rect_within({0, 0, 1, 1}, {0, 0, 1, 1}, true); |
| 186 | |
| 187 | test_rect_within({0, 0, 1, 1}, {1, 0, 2, 1}, false); |
| 188 | test_rect_within({0, 0, 1, 1}, {0, 1, 1, 2}, false); |
| 189 | test_rect_within({0, 0, 1, 1}, {-1, 0, 1, 1}, false); |
| 190 | test_rect_within({0, 0, 1, 1}, {0, -1, 1, 1}, false); |
| 191 | |
| 192 | test_rect_intersects({0, 0, 1, 1}, {0, 0, 1, 1}, true); |
| 193 | test_rect_intersects({0, 0, 1, 1}, {0, 0, 2, 1}, true); |
| 194 | test_rect_intersects({0, 0, 1, 1}, {0, 0, 1, 2}, true); |
| 195 | test_rect_intersects({0, 0, 1, 1}, {-1, 0, 1, 1}, true); |
| 196 | test_rect_intersects({0, 0, 1, 1}, {0, -1, 1, 1}, true); |
| 197 | |
| 198 | test_rect_intersects({0, 0, 1, 1}, {0, 1, 1, 2}, false); |
| 199 | test_rect_intersects({0, 0, 1, 1}, {1, 0, 2, 1}, false); |
| 200 | test_rect_intersects({0, 0, 1, 1}, {-1, 0, 0, 1}, false); |
| 201 | test_rect_intersects({0, 0, 1, 1}, {0, -1, 1, 0}, false); |
| 202 | if (!test_rect_compaction()) |
| 203 | { |
| 204 | return EXIT_FAILURE; |
| 205 | } |
| 206 | return EXIT_SUCCESS; |
| 207 | } |
nothing calls this directly
no test coverage detected