Debian Codegraph @

tests/test_edge_node_overlap_none_edge_arrow_various_arrowsizes.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 'none' arrow using various arrow sizes",
11 "An edge connected to a node shall touch that node and not overlap it too "
12 "much") {
13
14 std::string filename_base = AUTO_NAME();
15
16 const std::string_view primitive_arrow_shape = "none";
17
18 INFO("Edge arrowhead: " << primitive_arrow_shape);
19 filename_base += std::format("_arrow_shape_{}", primitive_arrow_shape);
20
21 const auto arrowsize = GENERATE(0.0, 0.1, 0.5, 1.0, 2.0, 3.0);
22 INFO("Edge arrowsize: " << arrowsize);
23 filename_base += std::format("_arrowsize_{}", arrowsize);
24
25 const graph_options graph_options = {
26 .node_shape = "polygon",
27 .node_penwidth = 2,
28 .dir = "both",
29 .edge_penwidth = 2,
30 .edge_arrowsize = arrowsize,
31 .primitive_arrowhead_shape = primitive_arrow_shape,
32 .primitive_arrowtail_shape = primitive_arrow_shape,
33 };
34
35 test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base});
36 }