From e860e06af763abf49156a0f54b3999153927a33b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 28 Sep 2022 08:32:45 -0700 Subject: [PATCH] =?utf8?q?tests:=20idiomatic=20use=20of=20Catch2=E2=80=99s?= =?utf8?q?=20'INFO'=20macro?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is slightly more concise, efficient, and readable. --- tests/test_clusters.cpp | 4 ++-- tests/test_edge_color.cpp | 4 ++-- tests/test_edge_fillcolor.cpp | 4 ++-- tests/test_edge_node_overlap_all_edge_arrows.cpp | 6 +++--- tests/test_edge_node_overlap_all_node_shapes.cpp | 2 +- tests/test_edge_node_overlap_all_primitive_edge_arrows.cpp | 4 ++-- tests/test_edge_node_overlap_cylinder_node_shape.cpp | 5 ++--- ...t_edge_node_overlap_ellipse_node_shapes_except_point.cpp | 4 ++-- tests/test_edge_node_overlap_normal_and_inv_edge_arrows.cpp | 2 +- ...ode_overlap_normal_and_inv_edge_arrows_all_modifiers.cpp | 6 +++--- tests/test_edge_node_overlap_point_node_shape.cpp | 5 ++--- tests/test_edge_node_overlap_polygon_node_shapes.cpp | 4 ++-- tests/test_edge_penwidth.cpp | 4 ++-- tests/test_engines.cpp | 4 ++-- tests/test_max_edge_node_overlap_polygon_node_shapes.cpp | 2 +- tests/test_min_edge_node_overlap_polygon_node_shapes.cpp | 2 +- tests/test_neatopack.cpp | 2 +- tests/test_node_color.cpp | 4 ++-- tests/test_node_fillcolor.cpp | 4 ++-- tests/test_node_penwidth.cpp | 4 ++-- tests/test_rankdir.cpp | 4 ++-- tests/test_subgraph_layout.cpp | 4 ++-- tests/test_subgraphs.cpp | 4 ++-- tests/test_svg_analyzer.cpp | 2 +- tests/test_svg_analyzer_color.cpp | 4 ++-- tests/test_svg_analyzer_fillcolor.cpp | 4 ++-- tests/test_svg_analyzer_penwidth.cpp | 4 ++-- 27 files changed, 50 insertions(+), 52 deletions(-) diff --git a/tests/test_clusters.cpp b/tests/test_clusters.cpp index 9a0d3a819..4a8658f21 100644 --- a/tests/test_clusters.cpp +++ b/tests/test_clusters.cpp @@ -24,7 +24,7 @@ TEST_CASE( : fmt::format("{} {{subgraph cluster_0 {{a {} b}}; subgraph " "cluster_1 {{c {} d }}}}", graph_type, edge_op, edge_op); - INFO(fmt::format("DOT source: {}", dot)); + INFO("DOT source: " << dot); auto g = agmemread(dot.c_str()); REQUIRE(g != nullptr); @@ -38,7 +38,7 @@ TEST_CASE( "osage", // "patchwork" // ); - INFO("Layout engine: " + engine); + INFO("Layout engine: " << engine); auto gvc = gvContextPlugins(lt_preloaded_symbols, false); diff --git a/tests/test_edge_color.cpp b/tests/test_edge_color.cpp index 0ef3c072b..012fe2a1d 100644 --- a/tests/test_edge_color.cpp +++ b/tests/test_edge_color.cpp @@ -11,12 +11,12 @@ TEST_CASE("Edge color", const auto primitive_arrow_shape = GENERATE(from_range(all_primitive_arrow_shapes)); - INFO(fmt::format("Primitive arrow shape: {}", primitive_arrow_shape)); + INFO("Primitive arrow shape: " << primitive_arrow_shape); const auto edge_rgb_color = GENERATE("#000000", "#ffffff", "#5580aa"); const auto opacity = GENERATE(0, 100, 255); const auto edge_rgba_color = fmt::format("{}{:02x}", edge_rgb_color, opacity); - INFO(fmt::format("Edge color: {}", edge_rgba_color)); + INFO("Edge color: " << edge_rgba_color); auto dot = fmt::format("digraph g1 {{edge [arrowhead={} color=\"{}\"]; a -> b}}", diff --git a/tests/test_edge_fillcolor.cpp b/tests/test_edge_fillcolor.cpp index 5a7afd561..d071c500e 100644 --- a/tests/test_edge_fillcolor.cpp +++ b/tests/test_edge_fillcolor.cpp @@ -13,13 +13,13 @@ TEST_CASE("Edge color", const auto primitive_arrow_shape = GENERATE(from_range(all_primitive_arrow_shapes)); - INFO(fmt::format("Primitive arrow shape: {}", primitive_arrow_shape)); + INFO("Primitive arrow shape: " << primitive_arrow_shape); const auto edge_rgb_fillcolor = GENERATE("#000000", "#ffffff", "#5580aa"); const auto opacity = GENERATE(0, 100, 255); const auto edge_rgba_fillcolor = fmt::format("{}{:02x}", edge_rgb_fillcolor, opacity); - INFO(fmt::format("Edge fillcolor: {}", edge_rgba_fillcolor)); + INFO("Edge fillcolor: " << edge_rgba_fillcolor); auto dot = fmt::format("digraph g1 {{edge [arrowhead={} fillcolor=\"{}\"]; a -> b}}", diff --git a/tests/test_edge_node_overlap_all_edge_arrows.cpp b/tests/test_edge_node_overlap_all_edge_arrows.cpp index 5503ee599..15f03cc93 100644 --- a/tests/test_edge_node_overlap_all_edge_arrows.cpp +++ b/tests/test_edge_node_overlap_all_edge_arrows.cpp @@ -18,15 +18,15 @@ TEST_CASE("Edge node overlap for all arrow shapes", const auto primitive_arrow_shape = GENERATE(from_range(all_primitive_arrow_shapes)); - INFO(fmt::format("Edge primitive arrow shape: {}", primitive_arrow_shape)); + INFO("Edge primitive arrow shape: " << primitive_arrow_shape); const auto arrow_shape_modifier = GENERATE(from_range(all_arrow_shape_modifiers)); - INFO(fmt::format("Edge arrow shape modifier: {}", arrow_shape_modifier)); + INFO("Edge arrow shape modifier: " << arrow_shape_modifier); const auto arrow_shape = fmt::format("{}{}", arrow_shape_modifier, primitive_arrow_shape); - INFO(fmt::format("Edge arrow shape: {}", arrow_shape)); + INFO("Edge arrow shape: " << arrow_shape); filename_base += fmt::format("_arrow_shape{}", arrow_shape); const graph_options graph_options = { diff --git a/tests/test_edge_node_overlap_all_node_shapes.cpp b/tests/test_edge_node_overlap_all_node_shapes.cpp index 944421561..e927d461b 100644 --- a/tests/test_edge_node_overlap_all_node_shapes.cpp +++ b/tests/test_edge_node_overlap_all_node_shapes.cpp @@ -13,7 +13,7 @@ TEST_CASE( "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)); + INFO("Node shape: " << shape); const graph_options graph_options = { .node_shape = shape, diff --git a/tests/test_edge_node_overlap_all_primitive_edge_arrows.cpp b/tests/test_edge_node_overlap_all_primitive_edge_arrows.cpp index 03ea2ffb5..74663a5d0 100644 --- a/tests/test_edge_node_overlap_all_primitive_edge_arrows.cpp +++ b/tests/test_edge_node_overlap_all_primitive_edge_arrows.cpp @@ -17,9 +17,9 @@ TEST_CASE("Edge node overlap for all primitive arrow shapes", const auto primitive_arrow_shape = GENERATE(from_range(all_primitive_arrow_shapes)); - INFO(fmt::format("Edge primitive arrow shape: {}", primitive_arrow_shape)); + INFO("Edge primitive arrow shape: " << primitive_arrow_shape); - INFO(fmt::format("Edge arrow shape: {}", primitive_arrow_shape)); + INFO("Edge arrow shape: " << primitive_arrow_shape); filename_base += fmt::format("_arrow_shape{}", primitive_arrow_shape); const graph_options graph_options = { diff --git a/tests/test_edge_node_overlap_cylinder_node_shape.cpp b/tests/test_edge_node_overlap_cylinder_node_shape.cpp index 9b265aab6..db2d428b3 100644 --- a/tests/test_edge_node_overlap_cylinder_node_shape.cpp +++ b/tests/test_edge_node_overlap_cylinder_node_shape.cpp @@ -2,7 +2,6 @@ #include #include -#include #include "test_edge_node_overlap_utilities.h" #include "test_utilities.h" @@ -12,10 +11,10 @@ TEST_CASE("Overlap cylinder node shape", "node touches that node and does not overlap it too much") { const auto shape = "cylinder"; - INFO(fmt::format("Node shape: {}", shape)); + INFO("Node shape: " << shape); const auto rankdir = GENERATE(from_range(all_rank_directions)); - INFO(fmt::format("Rank direction: {}", rankdir)); + INFO("Rank direction: " << rankdir); const graph_options graph_options = { .rankdir = rankdir, diff --git a/tests/test_edge_node_overlap_ellipse_node_shapes_except_point.cpp b/tests/test_edge_node_overlap_ellipse_node_shapes_except_point.cpp index eb2ab7739..567f39e6d 100644 --- a/tests/test_edge_node_overlap_ellipse_node_shapes_except_point.cpp +++ b/tests/test_edge_node_overlap_ellipse_node_shapes_except_point.cpp @@ -16,10 +16,10 @@ TEST_CASE("Overlap ellipse node shapes", filter([](const std::string_view shape) { return shape != "point"; }, from_range(node_shapes_consisting_of_ellipse))); - INFO(fmt::format("Node shape: {}", shape)); + INFO("Node shape: " << shape); const auto rankdir = GENERATE(from_range(all_rank_directions)); - INFO(fmt::format("Rank direction: {}", rankdir)); + INFO("Rank direction: " << rankdir); const graph_options graph_options = { .rankdir = rankdir, diff --git a/tests/test_edge_node_overlap_normal_and_inv_edge_arrows.cpp b/tests/test_edge_node_overlap_normal_and_inv_edge_arrows.cpp index f80e44516..f96a25a69 100644 --- a/tests/test_edge_node_overlap_normal_and_inv_edge_arrows.cpp +++ b/tests/test_edge_node_overlap_normal_and_inv_edge_arrows.cpp @@ -14,7 +14,7 @@ TEST_CASE("Edge node overlap for normal and inv arrow", const std::string_view primitive_arrow_shape = GENERATE("normal", "inv"); - INFO(fmt::format("Edge arrowhead: {}", primitive_arrow_shape)); + INFO("Edge arrowhead: " << primitive_arrow_shape); filename_base += fmt::format("_arrow_shape_{}", primitive_arrow_shape); const graph_options graph_options = { diff --git a/tests/test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers.cpp b/tests/test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers.cpp index 742037c4d..584e5b1ab 100644 --- a/tests/test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers.cpp +++ b/tests/test_edge_node_overlap_normal_and_inv_edge_arrows_all_modifiers.cpp @@ -17,15 +17,15 @@ TEST_CASE( std::string filename_base = "test_edge_node_overlap_all_edge_arrows"; const std::string_view primitive_arrow_shape = GENERATE("normal", "inv"); - INFO(fmt::format("Edge primitive arrow shape: {}", primitive_arrow_shape)); + INFO("Edge primitive arrow shape: " << primitive_arrow_shape); const auto arrow_shape_modifier = GENERATE(from_range(all_arrow_shape_modifiers)); - INFO(fmt::format("Edge arrow shape modifier: {}", arrow_shape_modifier)); + INFO("Edge arrow shape modifier: " << arrow_shape_modifier); const auto arrow_shape = fmt::format("{}{}", arrow_shape_modifier, primitive_arrow_shape); - INFO(fmt::format("Edge arrow shape: {}", arrow_shape)); + INFO("Edge arrow shape: " << arrow_shape); filename_base += fmt::format("_arrow_{}", arrow_shape); const graph_options graph_options = { diff --git a/tests/test_edge_node_overlap_point_node_shape.cpp b/tests/test_edge_node_overlap_point_node_shape.cpp index fe31aafab..acf4b7122 100644 --- a/tests/test_edge_node_overlap_point_node_shape.cpp +++ b/tests/test_edge_node_overlap_point_node_shape.cpp @@ -2,7 +2,6 @@ #include #include -#include #include "test_edge_node_overlap_utilities.h" #include "test_utilities.h" @@ -12,10 +11,10 @@ TEST_CASE("Overlap point node shape", "touches that node and does not overlap it too much") { const auto shape = "point"; - INFO(fmt::format("Node shape: {}", shape)); + INFO("Node shape: " << shape); const auto rankdir = GENERATE(from_range(all_rank_directions)); - INFO(fmt::format("Rank direction: {}", rankdir)); + INFO("Rank direction: " << rankdir); const graph_options graph_options = { .rankdir = rankdir, diff --git a/tests/test_edge_node_overlap_polygon_node_shapes.cpp b/tests/test_edge_node_overlap_polygon_node_shapes.cpp index 08db19aac..a38d7e9dd 100644 --- a/tests/test_edge_node_overlap_polygon_node_shapes.cpp +++ b/tests/test_edge_node_overlap_polygon_node_shapes.cpp @@ -11,10 +11,10 @@ TEST_CASE( "shape") { const auto shape = GENERATE(from_range(node_shapes_consisting_of_polygon)); - INFO(fmt::format("Node shape: {}", shape)); + INFO("Node shape: " << shape); const auto rankdir = GENERATE(from_range(all_rank_directions)); - INFO(fmt::format("Rank direction: {}", rankdir)); + INFO("Rank direction: " << rankdir); const graph_options graph_options = { .rankdir = rankdir, diff --git a/tests/test_edge_penwidth.cpp b/tests/test_edge_penwidth.cpp index e37ce8c10..05c653405 100644 --- a/tests/test_edge_penwidth.cpp +++ b/tests/test_edge_penwidth.cpp @@ -10,10 +10,10 @@ TEST_CASE("Edge penwidth", const auto primitive_arrow_shape = GENERATE(from_range(all_primitive_arrow_shapes)); - INFO(fmt::format("Primitive arrow shape: {}", primitive_arrow_shape)); + INFO("Primitive arrow shape: " << primitive_arrow_shape); const auto edge_penwidth = GENERATE(0.5, 1.0, 2.0); - INFO(fmt::format("Edge penwidth: {}", edge_penwidth)); + INFO("Edge penwidth: " << edge_penwidth); auto dot = fmt::format("digraph g1 {{edge [arrowhead={} penwidth={}]; a -> b}}", diff --git a/tests/test_engines.cpp b/tests/test_engines.cpp index 02454cdac..9f01a5ab4 100644 --- a/tests/test_engines.cpp +++ b/tests/test_engines.cpp @@ -16,7 +16,7 @@ TEST_CASE( const std::string edge_op = directed_graph ? "->" : "--"; std::string dot = fmt::format("{} {{a {} b}}", graph_type, edge_op); - INFO(fmt::format("DOT source: {}", dot)); + INFO("DOT source: " << dot); auto g = agmemread(dot.c_str()); REQUIRE(g != nullptr); @@ -30,7 +30,7 @@ TEST_CASE( "osage", // "patchwork" // ); - INFO("Layout engine: " + engine); + INFO("Layout engine: " << engine); auto gvc = gvContextPlugins(lt_preloaded_symbols, false); diff --git a/tests/test_max_edge_node_overlap_polygon_node_shapes.cpp b/tests/test_max_edge_node_overlap_polygon_node_shapes.cpp index 692cc16c3..182666e56 100644 --- a/tests/test_max_edge_node_overlap_polygon_node_shapes.cpp +++ b/tests/test_max_edge_node_overlap_polygon_node_shapes.cpp @@ -10,7 +10,7 @@ TEST_CASE( "not overlap that node, regardless of the node shape") { const auto shape = GENERATE(from_range(node_shapes_consisting_of_polygon)); - INFO(fmt::format("Node shape: {}", shape)); + INFO("Node shape: " << shape); const graph_options graph_options = { .node_shape = shape, diff --git a/tests/test_min_edge_node_overlap_polygon_node_shapes.cpp b/tests/test_min_edge_node_overlap_polygon_node_shapes.cpp index 11d8d1b9a..db12e5b9c 100644 --- a/tests/test_min_edge_node_overlap_polygon_node_shapes.cpp +++ b/tests/test_min_edge_node_overlap_polygon_node_shapes.cpp @@ -9,7 +9,7 @@ TEST_CASE("Minimum edge and node overlap for polygon node shapes", "node, regardless of the node shape") { const auto shape = GENERATE(from_range(node_shapes_consisting_of_polygon)); - INFO(fmt::format("Node shape: {}", shape)); + INFO("Node shape: " << shape); const graph_options graph_options = { .node_shape = shape, diff --git a/tests/test_neatopack.cpp b/tests/test_neatopack.cpp index 4843e0dcf..2b9b1460d 100644 --- a/tests/test_neatopack.cpp +++ b/tests/test_neatopack.cpp @@ -24,7 +24,7 @@ TEST_CASE("take an input graph, compute its connected components, lay out each " num_subgraphs == 1 ? fmt::format("{} {{a {} b}}", graph_type, edge_op) : fmt::format("{} {{a {} b; c {} d}}", graph_type, edge_op, edge_op); - INFO(fmt::format("DOT source: {}", dot)); + INFO("DOT source: " << dot); auto *g = agmemread(dot.c_str()); REQUIRE(g != nullptr); diff --git a/tests/test_node_color.cpp b/tests/test_node_color.cpp index e65ef9da8..a07558635 100644 --- a/tests/test_node_color.cpp +++ b/tests/test_node_color.cpp @@ -16,12 +16,12 @@ TEST_CASE("Node color", return !node_shapes_without_svg_shape.contains(shape); }, from_range(all_node_shapes))); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); const auto node_rgb_color = GENERATE("#000000", "#ffffff", "#5580aa"); const auto opacity = GENERATE(0, 100, 255); const auto node_rgba_color = fmt::format("{}{:02x}", node_rgb_color, opacity); - INFO(fmt::format("Node color: {}", node_rgba_color)); + INFO("Node color: " << node_rgba_color); auto dot = fmt::format("digraph g1 {{node [shape={} color=\"{}\"]; a -> b}}", shape, node_rgba_color); diff --git a/tests/test_node_fillcolor.cpp b/tests/test_node_fillcolor.cpp index d3e1bb519..96ef74436 100644 --- a/tests/test_node_fillcolor.cpp +++ b/tests/test_node_fillcolor.cpp @@ -16,14 +16,14 @@ TEST_CASE("Node fillcolor", return !node_shapes_without_svg_shape.contains(shape); }, from_range(all_node_shapes))); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); const auto node_rgb_fillcolor = GENERATE("#000000", "#ffffff", "#ff0000", "#aa0f55"); const auto opacity = GENERATE(0, 200, 255); const auto node_rgba_fillcolor = fmt::format("{}{:02x}", node_rgb_fillcolor, opacity); - INFO(fmt::format("Node fillcolor: {}", node_rgba_fillcolor)); + INFO("Node fillcolor: " << node_rgba_fillcolor); auto dot = fmt::format( "digraph g1 {{node [shape={} style=filled fillcolor=\"{}\"]; a -> b}}", diff --git a/tests/test_node_penwidth.cpp b/tests/test_node_penwidth.cpp index cfae76361..919d79421 100644 --- a/tests/test_node_penwidth.cpp +++ b/tests/test_node_penwidth.cpp @@ -15,10 +15,10 @@ TEST_CASE("Node penwidth", return !node_shapes_without_svg_shape.contains(shape); }, from_range(all_node_shapes))); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); const auto node_penwidth = GENERATE(0.5, 1.0, 2.0); - INFO(fmt::format("Node penwidth: {}", node_penwidth)); + INFO("Node penwidth: " << node_penwidth); auto dot = fmt::format("digraph g1 {{node [shape={} penwidth={}]; a -> b}}", shape, node_penwidth); diff --git a/tests/test_rankdir.cpp b/tests/test_rankdir.cpp index 34c194cfd..fd735ca8f 100644 --- a/tests/test_rankdir.cpp +++ b/tests/test_rankdir.cpp @@ -11,14 +11,14 @@ TEST_CASE("Graph rankdir", "Test that the Graphviz `rankdir` attribute affects " "correctly when the 'dot` layout engine is used") { const auto rankdir = GENERATE(from_range(all_rank_directions)); - INFO(fmt::format("Rankdir: {}", rankdir)); + INFO("Rankdir: " << rankdir); const auto shape = GENERATE(filter( [](std::string_view shape) { return !node_shapes_without_svg_shape.contains(shape); }, from_range(all_node_shapes))); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); auto dot = fmt::format( "digraph g1 {{rankdir={}; node [shape={} fontname=Courier]; a -> b}}", diff --git a/tests/test_subgraph_layout.cpp b/tests/test_subgraph_layout.cpp index 0c9241eda..ed1aaa216 100644 --- a/tests/test_subgraph_layout.cpp +++ b/tests/test_subgraph_layout.cpp @@ -23,7 +23,7 @@ TEST_CASE("subgraph layout in directed and undirected graphs with different " : fmt::format( "{} {{subgraph s0 {{a {} b}}; subgraph s1 {{c {} d }}}}", graph_type, edge_op, edge_op); - INFO(fmt::format("DOT source: {}", dot)); + INFO("DOT source: " << dot); auto g = agmemread(dot.c_str()); REQUIRE(g != nullptr); @@ -37,7 +37,7 @@ TEST_CASE("subgraph layout in directed and undirected graphs with different " "osage", // "patchwork" // ); - INFO("Layout engine: " + engine); + INFO("Layout engine: " << engine); auto gvc = gvContextPlugins(lt_preloaded_symbols, false); diff --git a/tests/test_subgraphs.cpp b/tests/test_subgraphs.cpp index 4e42ffc77..d6e74370c 100644 --- a/tests/test_subgraphs.cpp +++ b/tests/test_subgraphs.cpp @@ -23,7 +23,7 @@ TEST_CASE("subgraphs in directed and undirected graphs with different layout " : fmt::format( "{} {{subgraph s0 {{a {} b}}; subgraph s1 {{c {} d }}}}", graph_type, edge_op, edge_op); - INFO(fmt::format("DOT source: {}", dot)); + INFO("DOT source: " << dot); auto g = agmemread(dot.c_str()); REQUIRE(g != nullptr); @@ -37,7 +37,7 @@ TEST_CASE("subgraphs in directed and undirected graphs with different layout " "osage", // "patchwork" // ); - INFO("Layout engine: " + engine); + INFO("Layout engine: " << engine); auto gvc = gvContextPlugins(lt_preloaded_symbols, false); { diff --git a/tests/test_svg_analyzer.cpp b/tests/test_svg_analyzer.cpp index 3e83be88d..c5dc850b8 100644 --- a/tests/test_svg_analyzer.cpp +++ b/tests/test_svg_analyzer.cpp @@ -11,7 +11,7 @@ TEST_CASE("SvgAnalyzer", "from that data structure") { const auto shape = GENERATE(from_range(all_node_shapes)); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); auto dot = fmt::format("digraph g1 {{node [shape={}]; a -> b}}", shape); diff --git a/tests/test_svg_analyzer_color.cpp b/tests/test_svg_analyzer_color.cpp index 685e600ab..e30c1ecf4 100644 --- a/tests/test_svg_analyzer_color.cpp +++ b/tests/test_svg_analyzer_color.cpp @@ -12,11 +12,11 @@ TEST_CASE("SvgAnalyzer color", "the Graphviz `color` attribute is used for nodes and edges ") { const auto shape = GENERATE(from_range(all_node_shapes)); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); const std::string_view color = GENERATE("", "\"#10204000\"", "\"#10204080\"", "\"#102040ff\""); - INFO(fmt::format("Color: {}", color)); + INFO("Color: " << color); const auto color_attr = color.empty() ? "" : fmt::format(" color={}", color); auto dot = fmt::format("digraph g1 {{node [shape={}{}]; edge [{}]; a -> b}}", diff --git a/tests/test_svg_analyzer_fillcolor.cpp b/tests/test_svg_analyzer_fillcolor.cpp index 3f31f3bc5..23d7c3317 100644 --- a/tests/test_svg_analyzer_fillcolor.cpp +++ b/tests/test_svg_analyzer_fillcolor.cpp @@ -12,11 +12,11 @@ TEST_CASE("SvgAnalyzer fillcolor", "`fillcolor` attribute is used for nodes and edges ") { const auto shape = GENERATE(from_range(all_node_shapes)); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); const std::string_view fillcolor = GENERATE("", "\"#10204000\"", "\"#10204080\"", "\"#102040ff\""); - INFO(fmt::format("Fillcolor: {}", fillcolor)); + INFO("Fillcolor: " << fillcolor); const auto fillcolor_attr = fillcolor.empty() ? "" : fmt::format(" fillcolor={}", fillcolor); const std::string_view node_style = fillcolor.empty() ? "" : "filled"; diff --git a/tests/test_svg_analyzer_penwidth.cpp b/tests/test_svg_analyzer_penwidth.cpp index 7f42a2c6a..1a1c64592 100644 --- a/tests/test_svg_analyzer_penwidth.cpp +++ b/tests/test_svg_analyzer_penwidth.cpp @@ -10,10 +10,10 @@ TEST_CASE("SvgAnalyzer penwidth", "attribute is used for nodes and edges") { const auto shape = GENERATE(from_range(all_node_shapes)); - INFO(fmt::format("Shape: {}", shape)); + INFO("Shape: " << shape); const auto penwidth = GENERATE(0.5, 1.0, 2.0); - INFO(fmt::format("Node and edge penwidth: {}", penwidth)); + INFO("Node and edge penwidth: " << penwidth); auto dot = fmt::format( "digraph g1 {{node [shape={} penwidth={}]; edge [penwidth={}]; a -> b}}", -- 2.40.0