Debian Codegraph @

tests/test_edge_node_overlap_all_primitive_edge_arrows.cpp

raw
1 #include <format>
2 #include <string>
3
4 #include <catch2/catch_all.hpp>
5
6 #include "test_edge_node_overlap_utilities.h"
7 #include "test_utilities.h"
8
9 TEST_CASE("Edge node overlap for all primitive arrow shapes",
10 "An edge connected to a node shall touch that node and not overlap "
11 "it too much, regardless of the primitive arrow shape") {
12
13 std::string filename_base = AUTO_NAME();
14
15 const auto primitive_arrow_shape =
16 GENERATE(from_range(all_primitive_arrow_shapes));
17 INFO("Edge primitive arrow shape: " << primitive_arrow_shape);
18
19 INFO("Edge arrow shape: " << primitive_arrow_shape);
20 filename_base += std::format("_arrow_shape_{}", primitive_arrow_shape);
21
22 const graph_options graph_options = {
23 .node_shape = "polygon",
24 .node_penwidth = 2,
25 .dir = "both",
26 .edge_penwidth = 2,
27 .primitive_arrowhead_shape = primitive_arrow_shape,
28 .primitive_arrowtail_shape = primitive_arrow_shape,
29 };
30
31 test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base});
32 }