Debian Codegraph @

tests/test_edge_node_overlap_curve_and_icurve_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 curve and icurve arrow",
10 "An edge connected to a node shall touch that node and not overlap "
11 "it too much") {
12
13 std::string filename_base = AUTO_NAME();
14
15 const std::string_view primitive_arrow_shape = GENERATE("curve", "icurve");
16
17 const auto arrow_shape_modifier =
18 GENERATE(from_range(all_arrow_shape_modifiers));
19 INFO("Edge arrow shape modifier: " << arrow_shape_modifier);
20
21 const auto arrow_shape =
22 std::format("{}{}", arrow_shape_modifier, primitive_arrow_shape);
23 INFO("Edge arrowhead: " << arrow_shape);
24 filename_base += std::format("_arrow_shape_{}", arrow_shape);
25
26 const auto rankdir = GENERATE(from_range(all_rank_directions));
27 INFO("Rank direction: " << rankdir);
28 filename_base += std::format("_rankdir_{}", rankdir);
29
30 const graph_options graph_options = {
31 .rankdir = rankdir,
32 .node_shape = "polygon",
33 .node_penwidth = 2,
34 .dir = "both",
35 .edge_penwidth = 2,
36 .primitive_arrowhead_shape = primitive_arrow_shape,
37 .primitive_arrowtail_shape = primitive_arrow_shape,
38 .arrowhead_modifier = arrow_shape_modifier,
39 .arrowtail_modifier = arrow_shape_modifier,
40 };
41
42 test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base});
43 }