]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/graph/test/bidir_remove_edge.cpp
1 // (C) Copyright Jeremy Siek 2004
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
7 #include <boost/graph/adjacency_list.hpp>
8 #include <boost/cstdlib.hpp>
9 #include <boost/detail/lightweight_test.hpp>
16 int main(int, char*[])
19 typedef boost::adjacency_list
< boost::vecS
, boost::vecS
,
20 boost::bidirectionalS
, boost::no_property
, edge_prop
>
22 typedef boost::graph_traits
< graph
>::edge_descriptor edge
;
29 boost::tie(e
, b
) = add_edge(0, 1, p
, g
);
30 BOOST_TEST(num_edges(g
) == 1);
31 BOOST_TEST(g
[e
].weight
== 42);
33 BOOST_TEST(num_edges(g
) == 0);
36 typedef boost::adjacency_list
< boost::vecS
, boost::vecS
,
37 boost::bidirectionalS
>
39 typedef boost::graph_traits
< graph
>::edge_descriptor edge
;
45 boost::tie(e
, b
) = add_edge(0, 1, g
);
46 BOOST_TEST(num_edges(g
) == 1);
48 BOOST_TEST(num_edges(g
) == 0);
50 return boost::report_errors();