| 70 | } |
| 71 | |
| 72 | void VerifyGraphStats() { |
| 73 | int nodes = 0; |
| 74 | for (const Node* n : graph_.nodes()) { |
| 75 | VLOG(1) << n->id(); |
| 76 | ++nodes; |
| 77 | } |
| 78 | EXPECT_EQ(nodes, graph_.num_nodes()); |
| 79 | int edges = 0; |
| 80 | for (const Edge* e : graph_.edges()) { |
| 81 | VLOG(1) << e->id(); |
| 82 | ++edges; |
| 83 | } |
| 84 | EXPECT_EQ(edges, graph_.num_edges()); |
| 85 | } |
| 86 | |
| 87 | Node* AddNodeWithName(const string& name) { |
| 88 | Node* node; |