We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9298d7c commit 3abfdd7Copy full SHA for 3abfdd7
Tests/0003_Graph/0001_BreadthFirstSearchTest.cc
@@ -5,7 +5,8 @@
5
// Demonstrate some basic assertions.
6
namespace BreadthFirstSearchTest
7
{
8
- TEST(BFSTesting, ShowBFSResultTest) {
+ TEST(BFSTesting, ShowBFSResultTest01)
9
+ {
10
BFSGraph graph;
11
12
graph.PushUndirectedEdge('s', 'r');
@@ -25,4 +26,17 @@ namespace BreadthFirstSearchTest
25
26
string expectedResult = " r(1) s(0) t(2) u(3) v(2) w(1) x(2) y(3)";
27
EXPECT_EQ(actualResult, expectedResult);
28
}
29
+
30
+ TEST(BFSTesting, ShowBFSResultTest02)
31
32
+ BFSGraph graph;
33
34
+ graph.PushUndirectedEdge('s', 'r');
35
36
+ graph.BFS('s');
37
38
+ string actualResult = graph.ShowBFSResult();
39
+ string expectedResult = " r(1) s(0)";
40
+ EXPECT_EQ(actualResult, expectedResult);
41
+ }
42
0 commit comments