]> granicus.if.org Git - graphviz/commitdiff
tests: test_rankdir: remove useless generation of copy
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 23 Aug 2022 19:09:44 +0000 (21:09 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 30 Aug 2022 20:17:04 +0000 (22:17 +0200)
The generator expression will not outlive the scope of
'node_shapes_without_svg_shape' or 'all_node_shapes' which both live
in the global scope, so copying is unnecessary.

For details, see
https://github.com/catchorg/Catch2/blob/devel/docs/generators.md#provided-generators.

tests/test_rankdir.cpp

index e023c39d0c227f6a6eb4e8fca58cae98f0cf57fd..5c5b65a515dcc1e52912a5967869960428788bd8 100644 (file)
@@ -17,7 +17,7 @@ TEST_CASE("Graph rankdir", "Test that the Graphviz `rankdir` attribute affects "
   const auto rankdir = GENERATE(from_range(all_rank_directions));
   INFO(fmt::format("Rankdir: {}", rankdir));
 
-  const auto shape = GENERATE_COPY(filter(
+  const auto shape = GENERATE(filter(
       [](std::string_view shape) {
         return !node_shapes_without_svg_shape.contains(shape);
       },