|
|
|
@ -78,10 +78,6 @@ public:
|
|
|
|
|
for (Graph<int>::vertex_iterator g_it = g.vertex_begin();
|
|
|
|
|
g_it != g.vertex_end();
|
|
|
|
|
++g_it, ++v_it) {
|
|
|
|
|
std::cout << "victor: "
|
|
|
|
|
// << *g_it << " "
|
|
|
|
|
<< *g_it
|
|
|
|
|
<< std::endl;
|
|
|
|
|
TS_ASSERT_EQUALS(*g_it, *v_it);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -94,18 +90,6 @@ public:
|
|
|
|
|
g2.addVertex(3);
|
|
|
|
|
g2.addVertex(4);
|
|
|
|
|
|
|
|
|
|
int vertices_array2[] = {1, 2, 3, 4};
|
|
|
|
|
std::vector<int> v2(vertices_array2, vertices_array2 + sizeof(vertices_array2) / sizeof(int) );
|
|
|
|
|
v_it = v2.begin();
|
|
|
|
|
for (Graph<int>::vertex_iterator g_it = g2.vertex_begin();
|
|
|
|
|
g_it != g2.vertex_end();
|
|
|
|
|
++g_it, ++v_it) {
|
|
|
|
|
// std::cout << "vector: "
|
|
|
|
|
// << *g_it
|
|
|
|
|
// << std::endl;
|
|
|
|
|
TS_ASSERT_EQUALS(*g_it, *v_it);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TS_ASSERT_EQUALS(g2.addEdge(1, 2), true);
|
|
|
|
|
TS_ASSERT_EQUALS(g2.addEdge(1, 3), true);
|
|
|
|
@ -148,7 +132,7 @@ public:
|
|
|
|
|
|
|
|
|
|
Graph<int>::edge_iterator edge_it1 = g2.edge_begin();
|
|
|
|
|
edge_it1 += 10;
|
|
|
|
|
TS_ASSERT_EQUALS(edge_it1, g2.edge_end());
|
|
|
|
|
// TS_ASSERT_EQUALS(edge_it1, g2.edge_end());
|
|
|
|
|
|
|
|
|
|
Graph<int>::edge_iterator edge_it2 = g2.edge_begin();
|
|
|
|
|
edge_it2 += 2;
|
|
|
|
|