From f4f93499fea96fa2ff6f9d2ff8c0a027b387f2eb Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Wed, 14 Sep 2022 22:13:37 +0200 Subject: [PATCH] add new test_edge_node_overlap_all_node_shapes test --- tests/CMakeLists.txt | 1 + ...test_edge_node_overlap_all_node_shapes.cpp | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/test_edge_node_overlap_all_node_shapes.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4b09c3f8e..1efc556be 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -88,6 +88,7 @@ CREATE_TEST(GVContext_construction) CREATE_TEST(GVContext_render_svg) CREATE_TEST(GVLayout_construction) CREATE_TEST(GVLayout_render) +CREATE_TEST(edge_node_overlap_all_node_shapes) CREATE_TEST(edge_node_overlap_simple) CREATE_TEST(max_edge_node_overlap_simple) CREATE_TEST(min_edge_node_overlap_simple) diff --git a/tests/test_edge_node_overlap_all_node_shapes.cpp b/tests/test_edge_node_overlap_all_node_shapes.cpp new file mode 100644 index 000000000..944421561 --- /dev/null +++ b/tests/test_edge_node_overlap_all_node_shapes.cpp @@ -0,0 +1,27 @@ +#include +#include + +#include +#include + +#include "test_edge_node_overlap_utilities.h" +#include "test_utilities.h" + +TEST_CASE( + "Overlap all node shapes", + "[!shouldfail] Test that an edge connected to a node touches that node and " + "does not overlap it too much, regardless of the node shape") { + + const auto shape = GENERATE(from_range(all_node_shapes)); + INFO(fmt::format("Node shape: {}", shape)); + + const graph_options graph_options = { + .node_shape = shape, + .node_penwidth = 2, + .edge_penwidth = 2, + }; + + const auto filename_base = fmt::format("{}_{}", AUTO_NAME(), shape); + + test_edge_node_overlap(graph_options, {}, {.filename_base = filename_base}); +} -- 2.40.0