mirror of
https://github.com/boostorg/graph.git
synced 2026-01-19 04:12:11 +00:00
Extend unit test to cover directed graphs as well and add a couple of checks.
This commit is contained in:
@@ -56,12 +56,22 @@ int main(int argc, char* argv[])
|
||||
BOOST_TEST(m_graph[ed1] == EDGE_VAL);
|
||||
|
||||
// https://github.com/boostorg/graph/issues/268
|
||||
// 1. Undirected:
|
||||
{
|
||||
boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS> g;
|
||||
boost::add_edge(2, 0, g);
|
||||
boost::remove_vertex(1, g);
|
||||
BOOST_TEST(num_vertices(g) == 2);
|
||||
BOOST_TEST(num_edges(g) == 1);
|
||||
}
|
||||
// 2. Directed:
|
||||
{
|
||||
boost::adjacency_list<boost::setS, boost::vecS, boost::directedS> g;
|
||||
boost::add_edge(2, 0, g);
|
||||
boost::remove_vertex(1, g);
|
||||
BOOST_TEST(num_vertices(g) == 2);
|
||||
BOOST_TEST(num_edges(g) == 1);
|
||||
}
|
||||
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user