Debian Codegraph @

tests/test_edge_node_overlap_ellipse_node_shapes_except_point.cpp

raw
1 #include <format>
2 #include <iostream>
3 #include <string>
4
5 #include <catch2/catch_all.hpp>
6
7 #include "test_edge_node_overlap_utilities.h"
8 #include "test_utilities.h"
9
10 TEST_CASE(
11 "Overlap ellipse node shapes",
12 "Test that an edge connected to an ellipse based node touches that "
13 "node and does not overlap it too much, regardless of the node shape") {
14
15 const auto shape = GENERATE_COPY(
16 filter([](const std::string_view s) { return s != "point"; },
17 from_range(node_shapes_consisting_of_ellipse)));
18
19 INFO("Node shape: " << shape);
20
21 const auto rankdir = GENERATE(from_range(all_rank_directions));
22 INFO("Rank direction: " << rankdir);
23
24 const graph_options graph_options = {
25 .rankdir = rankdir,
26 .node_shape = shape,
27 .node_penwidth = 2,
28 .edge_penwidth = 2,
29 };
30
31 const auto filename_base =
32 std::format("{}_{}_rankdir_{}", AUTO_NAME(), shape, rankdir);
33
34 test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base});
35 }