Debian Codegraph @

tests/test_edge_node_overlap_normal_and_inv_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(
10 "Edge node overlap for normal and inv arrow",
11 "An edge connected to a node shall touch that node and not overlap it too "
12 "much, regardless of if the arrow shape is 'normal' or 'inv'") {
13
14 std::string filename_base = AUTO_NAME();
15
16 const std::string_view primitive_arrow_shape = GENERATE("normal", "inv");
17
18 INFO("Edge arrowhead: " << primitive_arrow_shape);
19 filename_base += std::format("_arrow_shape_{}", primitive_arrow_shape);
20
21 const graph_options graph_options = {
22 .node_shape = "polygon",
23 .node_penwidth = 2,
24 .dir = "both",
25 .edge_penwidth = 2,
26 .primitive_arrowhead_shape = primitive_arrow_shape,
27 .primitive_arrowtail_shape = primitive_arrow_shape,
28 };
29
30 test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base});
31 }