alpar@209: /* -*- mode: C++; indent-tabs-mode: nil; -*- alpar@96: * alpar@209: * This file is a part of LEMON, a generic C++ optimization library. alpar@96: * alpar@463: * Copyright (C) 2003-2009 alpar@96: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport alpar@96: * (Egervary Research Group on Combinatorial Optimization, EGRES). alpar@96: * alpar@96: * Permission to use, modify and distribute this software is granted alpar@96: * provided that this copyright notice appears in all copies. For alpar@96: * precise terms see the accompanying LICENSE file. alpar@96: * alpar@96: * This software is provided "AS IS" with no warranty of any kind, alpar@96: * express or implied, and with no claim as to its suitability for any alpar@96: * purpose. alpar@96: * alpar@96: */ alpar@96: alpar@96: #include alpar@96: #include alpar@96: alpar@96: #include alpar@96: #include alpar@96: alpar@96: #include alpar@96: #include alpar@96: alpar@96: #include "test_tools.h" alpar@96: alpar@96: using namespace std; alpar@96: using namespace lemon; alpar@96: alpar@96: void check_concepts() { alpar@96: checkConcept, concepts::Path >(); alpar@96: checkConcept, Path >(); alpar@96: checkConcept, SimplePath >(); alpar@96: checkConcept, StaticPath >(); alpar@96: checkConcept, ListPath >(); alpar@96: } alpar@96: alpar@1144: // Check if proper copy consructor is called (use valgrind for testing) alpar@1144: template alpar@1144: void checkCopy() alpar@1144: { alpar@1144: ListDigraph g; alpar@1144: ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); alpar@1144: alpar@1144: _Path p,q; alpar@1144: p.addBack(a); alpar@1144: q=p; alpar@1144: _Path r(p); alpar@1144: StaticPath s(r); alpar@1144: } alpar@1144: alpar@96: int main() { alpar@209: check_concepts(); alpar@1144: alpar@1144: checkCopy >(); alpar@1144: checkCopy >(); alpar@1144: checkCopy >(); alpar@1144: alpar@1144: ListDigraph g; alpar@1144: ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); alpar@1144: alpar@1144: Path p; alpar@1144: StaticPath q,r; alpar@1144: p.addBack(a); alpar@1144: q=p; alpar@1144: r=q; alpar@1144: StaticPath s(q); alpar@1144: alpar@96: return 0; alpar@96: }