We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba0420c commit 538070cCopy full SHA for 538070c
unit/util/graph.cpp
@@ -329,6 +329,17 @@ SCENARIO("predecessors-successors-graph", "[core][util][graph]")
329
REQUIRE(graph.get_successors(indices[0]).size() == 1);
330
REQUIRE(graph.get_predecessors(indices[1]).size() == 1);
331
REQUIRE(graph.get_successors(indices[1]).size() == 0);
332
+
333
+ int count = 0;
334
+ graph.for_each_predecessor(
335
+ indices[1], [&](const simple_grapht::node_indext &n) { count++; });
336
+ REQUIRE(count == 1);
337
338
+ // Refresh counter.
339
+ count = 0;
340
+ graph.for_each_successor(
341
342
+ REQUIRE(count == 0);
343
}
344
345
0 commit comments