| 1 |
#include <format> |
| 2 |
#include <iostream> |
| 3 |
#include <string> |
| 4 |
|
| 5 |
#include <catch2/catch_all.hpp> |
| 6 |
|
| 7 |
#include "test_edge_node_overlap_utilities.h" |
| 8 |
#include "test_utilities.h" |
| 9 |
|
| 10 |
TEST_CASE("Overlap plain node shape", |
| 11 |
"Test that an edge connected to a 'plain' shaped node touches " |
| 12 |
"that node and does not overlap it too much") { |
| 13 |
|
| 14 |
std::string filename_base = AUTO_NAME(); |
| 15 |
|
| 16 |
const auto shape = "plain"; |
| 17 |
INFO("Node shape: " << shape); |
| 18 |
|
| 19 |
const double fontsize = GENERATE(range(2, 101)); |
| 20 |
INFO("Node fontsize: " << fontsize); |
| 21 |
filename_base += std::format("_fontsize_{}", fontsize); |
| 22 |
|
| 23 |
const auto rankdir = GENERATE(from_range(all_rank_directions)); |
| 24 |
INFO("Rank direction: " << rankdir); |
| 25 |
filename_base += std::format("_rankdir_{}", rankdir); |
| 26 |
|
| 27 |
const graph_options graph_options = { |
| 28 |
.rankdir = rankdir, |
| 29 |
.node_shape = shape, |
| 30 |
.node_fontsize = fontsize, |
| 31 |
.node_penwidth = 1, |
| 32 |
.edge_penwidth = 1, |
| 33 |
}; |
| 34 |
|
| 35 |
test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base}); |
| 36 |
} |