diff --git a/main.cpp b/main.cpp index 7be70a7..fef0823 100644 --- a/main.cpp +++ b/main.cpp @@ -71,6 +71,19 @@ int main() assert(g.neighboursOf(5).size() == 0); + Graph g2; + g.addVertex(1); + g.addVertex(2); + g.addVertex(3); + g.addVertex(4); + + int vertices_array2[] = {1, 2, 3, 4}; + std::vector v2(vertices_array2, vertices_array2 + sizeof(vertices_array2) / sizeof(int) ); + for (g_it = g2.begin(), v_it = v2.begin(); + g_it != g2.end(); + g_it++, v_it++) + assert(*g_it == *v_it); + return 0; }