From 85dcec15e6393965ab9fb43f03f87be7b357fd1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=A0=D1=8B=D0=B1=D0=BA=D0=B8=D0=BD=D0=B0?= Date: Tue, 26 Nov 2024 00:16:40 +0300 Subject: [PATCH] lab 4 update --- LibraryCPPTemplate/Tests/graph.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/LibraryCPPTemplate/Tests/graph.cpp b/LibraryCPPTemplate/Tests/graph.cpp index 70b58652c5..5467d720bc 100644 --- a/LibraryCPPTemplate/Tests/graph.cpp +++ b/LibraryCPPTemplate/Tests/graph.cpp @@ -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;