This is slightly more concise, efficient, and readable.
: 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);
"osage", //
"patchwork" //
);
- INFO("Layout engine: " + engine);
+ INFO("Layout engine: " << engine);
auto gvc = gvContextPlugins(lt_preloaded_symbols, false);
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}}",
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}}",
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 = {
"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,
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 = {
#include <string>
#include <catch2/catch.hpp>
-#include <fmt/format.h>
#include "test_edge_node_overlap_utilities.h"
#include "test_utilities.h"
"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,
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,
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 = {
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 = {
#include <string>
#include <catch2/catch.hpp>
-#include <fmt/format.h>
#include "test_edge_node_overlap_utilities.h"
#include "test_utilities.h"
"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,
"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,
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}}",
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);
"osage", //
"patchwork" //
);
- INFO("Layout engine: " + engine);
+ INFO("Layout engine: " << engine);
auto gvc = gvContextPlugins(lt_preloaded_symbols, false);
"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,
"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,
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);
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);
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}}",
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);
"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}}",
: 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);
"osage", //
"patchwork" //
);
- INFO("Layout engine: " + engine);
+ INFO("Layout engine: " << engine);
auto gvc = gvContextPlugins(lt_preloaded_symbols, false);
: 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);
"osage", //
"patchwork" //
);
- INFO("Layout engine: " + engine);
+ INFO("Layout engine: " << engine);
auto gvc = gvContextPlugins(lt_preloaded_symbols, false);
{
"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);
"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}}",
"`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";
"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}}",