Skip to content

Commit

Permalink
lab 4 update
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-anastasiia committed Nov 25, 2024
1 parent 53a1d93 commit 85dcec1
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions LibraryCPPTemplate/Tests/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,20 @@ int main() {
// return 1;
//}
//
////////////Vertex removal check//////////////////////////////////////////
//graph.add_Edge(0, 1, 10);
//graph.add_Edge(2, 3, 5);
//graph.add_Edge(0, 4, 1);

//int index1 = 3;
//std::cout << "Deleting a vertex with an index: " << index1 << std::endl;
//graph.remove_Vertex(index1);
//if (graph.get_VertexAmount() != 4) {
// std::cout << "Invalid vertex deletion" << std::endl;
// return 1;
//}
//else {
// std::cout << "valid vertex removal" << std::endl;
//}
//////////Vertex removal check//////////////////////////////////////////
graph.add_Edge(2, 3, 5);
graph.add_Edge(0, 4, 1);

int index1 = 3;
std::cout << "Deleting a vertex with an index: " << index1 << std::endl;
graph.remove_Vertex(index1);
if (graph.get_VertexAmount() != 4) {
std::cout << "Invalid vertex deletion" << std::endl;
return 1;
}
else {
std::cout << "valid vertex removal" << std::endl;
}


return 0;
Expand Down

0 comments on commit 85dcec1

Please sign in to comment.