4
4
// Boost Software License, Version 1.0 (See accompanying file
5
5
// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
6
7
- #include < iostream>
8
7
#include < string>
9
- #include < set>
10
8
11
9
#include < boost/assert.hpp>
10
+ #include < boost/concept/assert.hpp>
12
11
#include < boost/range.hpp>
13
12
13
+ #include < boost/graph/graph_concepts.hpp>
14
14
#include < boost/graph/undirected_graph.hpp>
15
15
#include < boost/graph/directed_graph.hpp>
16
16
#include < boost/graph/labeled_graph.hpp>
17
17
18
18
#include " typestr.hpp"
19
19
20
- using std::cout;
21
20
using std::string;
22
21
using namespace boost ;
23
22
23
+ void test_concepts ();
24
24
void test_norm ();
25
25
void test_temp ();
26
26
void test_bacon ();
@@ -29,13 +29,37 @@ void test_multiple_associative_container();
29
29
30
30
int main ()
31
31
{
32
+ test_concepts ();
32
33
test_norm ();
33
34
test_temp ();
34
35
test_bacon ();
35
36
test_remove_labeled_vertex ();
36
37
test_multiple_associative_container ();
37
38
}
38
39
40
+ // ////////////////////////////////////
41
+ // Graph Concepts
42
+ // ////////////////////////////////////
43
+
44
+ void test_concepts ()
45
+ {
46
+ // The labeled mutable graph hides the add_ and remove_ vertex functions
47
+ // from the mutable graph concept, so VertexMutableGraphConcept will not be
48
+ // tested here.
49
+ {
50
+ typedef labeled_graph< directed_graph<>, unsigned > Graph;
51
+ BOOST_CONCEPT_ASSERT ((VertexListGraphConcept< Graph >));
52
+ BOOST_CONCEPT_ASSERT ((AdjacencyGraphConcept< Graph >));
53
+ BOOST_CONCEPT_ASSERT ((EdgeMutableGraphConcept< Graph >));
54
+ }
55
+ {
56
+ typedef labeled_graph< undirected_graph<>, unsigned > Graph;
57
+ BOOST_CONCEPT_ASSERT ((VertexListGraphConcept< Graph >));
58
+ BOOST_CONCEPT_ASSERT ((AdjacencyGraphConcept< Graph >));
59
+ BOOST_CONCEPT_ASSERT ((EdgeMutableGraphConcept< Graph >));
60
+ }
61
+ }
62
+
39
63
// ////////////////////////////////////
40
64
// Utility Functions and Types
41
65
// ////////////////////////////////////
0 commit comments