#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE MyTest #include #include #include #include #include #include using namespace std; using namespace boost; using namespace boost::random; typedef adjacency_list Graph; BOOST_AUTO_TEST_CASE(my_test) { for (int n = 20; n <= 30; ++n) for (int e = 10; e <= 20; ++e) for (int s = 1; s <= 100; ++s) { Graph g; minstd_rand gen; gen.seed(s); generate_random_graph(g, n, e, gen, false); // Remove the whitespace below. I had put the whitespace there // because Trac thought the file is spam, and blocked it. BOOST_CHECK_MESS AGE(num_edges(g) == e, "n = " << n << ", e = " << e << ", s = " << s << ", but got " << num_edges(g) << " edges"); } }