19 using Graph = Digraph<char, std::string>;
22 BEAST_EXPECT(!graph.connected(
'a',
'b'));
23 BEAST_EXPECT(!graph.edge(
'a',
'b'));
24 BEAST_EXPECT(!graph.disconnect(
'a',
'b'));
26 BEAST_EXPECT(graph.connect(
'a',
'b',
"foobar"));
27 BEAST_EXPECT(graph.connected(
'a',
'b'));
29 *graph.edge(
'a',
'b') ==
"foobar");
31 BEAST_EXPECT(!graph.connect(
'a',
'b',
"repeat"));
32 BEAST_EXPECT(graph.disconnect(
'a',
'b'));
33 BEAST_EXPECT(graph.connect(
'a',
'b',
"repeat"));
34 BEAST_EXPECT(graph.connected(
'a',
'b'));
36 *graph.edge(
'a',
'b') ==
"repeat");
38 BEAST_EXPECT(graph.connect(
'a',
'c',
"tree"));
43 for (
auto const& edge : graph.outEdges(
'a'))
51 BEAST_EXPECT(edges == expected);
52 BEAST_EXPECT(graph.outDegree(
'a') == expected.
size());
55 BEAST_EXPECT(graph.outEdges(
'r').size() == 0);
56 BEAST_EXPECT(graph.outDegree(
'r') == 0);
57 BEAST_EXPECT(graph.outDegree(
'c') == 0);
60 BEAST_EXPECT(graph.outVertices().size() == 1);
63 BEAST_EXPECT((graph.outVertices(
'a') == expected));
64 BEAST_EXPECT(graph.outVertices(
'b').size() == 0);
65 BEAST_EXPECT(graph.outVertices(
'c').size() == 0);
66 BEAST_EXPECT(graph.outVertices(
'r').size() == 0);
69 graph.saveDot(ss, [](
char v) {
return v; });
75 BEAST_EXPECT(ss.
str() == expectedDot);