18 using Graph = Digraph<char, std::string>;
21 BEAST_EXPECT(!graph.connected(
'a',
'b'));
22 BEAST_EXPECT(!graph.edge(
'a',
'b'));
23 BEAST_EXPECT(!graph.disconnect(
'a',
'b'));
25 BEAST_EXPECT(graph.connect(
'a',
'b',
"foobar"));
26 BEAST_EXPECT(graph.connected(
'a',
'b'));
28 *graph.edge(
'a',
'b') ==
"foobar");
30 BEAST_EXPECT(!graph.connect(
'a',
'b',
"repeat"));
31 BEAST_EXPECT(graph.disconnect(
'a',
'b'));
32 BEAST_EXPECT(graph.connect(
'a',
'b',
"repeat"));
33 BEAST_EXPECT(graph.connected(
'a',
'b'));
35 *graph.edge(
'a',
'b') ==
"repeat");
37 BEAST_EXPECT(graph.connect(
'a',
'c',
"tree"));
42 for (
auto const& edge : graph.outEdges(
'a'))
50 BEAST_EXPECT(edges == expected);
51 BEAST_EXPECT(graph.outDegree(
'a') == expected.
size());
54 BEAST_EXPECT(graph.outEdges(
'r').size() == 0);
55 BEAST_EXPECT(graph.outDegree(
'r') == 0);
56 BEAST_EXPECT(graph.outDegree(
'c') == 0);
59 BEAST_EXPECT(graph.outVertices().size() == 1);
62 BEAST_EXPECT((graph.outVertices(
'a') == expected));
63 BEAST_EXPECT(graph.outVertices(
'b').size() == 0);
64 BEAST_EXPECT(graph.outVertices(
'c').size() == 0);
65 BEAST_EXPECT(graph.outVertices(
'r').size() == 0);
68 graph.saveDot(ss, [](
char v) {
return v; });
74 BEAST_EXPECT(ss.
str() == expectedDot);