| 1 |
#include <catch2/catch_all.hpp> |
| 2 |
#include <format> |
| 3 |
|
| 4 |
#include "test_edge_node_overlap_utilities.h" |
| 5 |
#include "test_utilities.h" |
| 6 |
|
| 7 |
TEST_CASE( |
| 8 |
"Overlap polygon node shapes", |
| 9 |
"Test that an edge connected to a polygon based node touches that node and " |
| 10 |
"does not overlap it too much, regardless of the node shape") { |
| 11 |
|
| 12 |
const auto shape = GENERATE(from_range(node_shapes_consisting_of_polygon)); |
| 13 |
INFO("Node shape: " << shape); |
| 14 |
|
| 15 |
const auto rankdir = GENERATE(from_range(all_rank_directions)); |
| 16 |
INFO("Rank direction: " << rankdir); |
| 17 |
|
| 18 |
const graph_options graph_options = { |
| 19 |
.rankdir = rankdir, |
| 20 |
.node_shape = shape, |
| 21 |
.node_penwidth = 2, |
| 22 |
.edge_penwidth = 2, |
| 23 |
}; |
| 24 |
|
| 25 |
const auto filename_base = |
| 26 |
std::format("{}_{}_rankdir_{}", AUTO_NAME(), shape, rankdir); |
| 27 |
|
| 28 |
test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base}); |
| 29 |
} |