Skip to content

Commit 85dcec1

Browse files
committed
lab 4 update
1 parent 53a1d93 commit 85dcec1

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

LibraryCPPTemplate/Tests/graph.cpp

+14-15
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,20 @@ int main() {
140140
// return 1;
141141
//}
142142
//
143-
////////////Vertex removal check//////////////////////////////////////////
144-
//graph.add_Edge(0, 1, 10);
145-
//graph.add_Edge(2, 3, 5);
146-
//graph.add_Edge(0, 4, 1);
147-
148-
//int index1 = 3;
149-
//std::cout << "Deleting a vertex with an index: " << index1 << std::endl;
150-
//graph.remove_Vertex(index1);
151-
//if (graph.get_VertexAmount() != 4) {
152-
// std::cout << "Invalid vertex deletion" << std::endl;
153-
// return 1;
154-
//}
155-
//else {
156-
// std::cout << "valid vertex removal" << std::endl;
157-
//}
143+
//////////Vertex removal check//////////////////////////////////////////
144+
graph.add_Edge(2, 3, 5);
145+
graph.add_Edge(0, 4, 1);
146+
147+
int index1 = 3;
148+
std::cout << "Deleting a vertex with an index: " << index1 << std::endl;
149+
graph.remove_Vertex(index1);
150+
if (graph.get_VertexAmount() != 4) {
151+
std::cout << "Invalid vertex deletion" << std::endl;
152+
return 1;
153+
}
154+
else {
155+
std::cout << "valid vertex removal" << std::endl;
156+
}
158157

159158

160159
return 0;

0 commit comments

Comments
 (0)