diff -r 4bb9e72e1a41 -r 7fdaa05a69a1 test/path_test.cc --- a/test/path_test.cc Wed Sep 12 17:25:48 2012 +0200 +++ b/test/path_test.cc Thu Sep 13 11:56:19 2012 +0200 @@ -38,7 +38,36 @@ checkConcept, ListPath >(); } +// Check if proper copy consructor is called (use valgrind for testing) +template +void checkCopy() +{ + ListDigraph g; + ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); + + _Path p,q; + p.addBack(a); + q=p; + _Path r(p); + StaticPath s(r); +} + int main() { check_concepts(); + + checkCopy >(); + checkCopy >(); + checkCopy >(); + + ListDigraph g; + ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); + + Path p; + StaticPath q,r; + p.addBack(a); + q=p; + r=q; + StaticPath s(q); + return 0; }