Debian Codegraph @

tests/test_max_edge_node_overlap_polygon_node_shapes.cpp

raw
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("Maximum edge and node overlap for polygon node shapes",
8 "Test that an edge connected to a polygon based node does not "
9 "overlap that node, regardless of the node shape") {
10
11 const auto shape = GENERATE(from_range(node_shapes_consisting_of_polygon));
12 INFO("Node shape: " << shape);
13
14 const graph_options graph_options = {
15 .node_shape = shape,
16 .node_penwidth = 2,
17 .edge_penwidth = 2,
18 };
19
20 const tc_check_options check_options = {
21 .check_max_edge_node_overlap = true,
22 .check_min_edge_node_overlap = false,
23 .check_max_edge_stem_arrow_overlap = false,
24 .check_min_edge_stem_arrow_overlap = false,
25 };
26
27 const auto filename_base = std::format("{}_{}", AUTO_NAME(), shape);
28
29 test_edge_node_overlap(graph_options, check_options,
30 {.filename_base = filename_base});
31 }