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@440: * 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@990: // Check if proper copy consructor is called (use valgrind for testing) alpar@990: template alpar@990: void checkCopy() alpar@990: { alpar@990: ListDigraph g; alpar@990: ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); alpar@990: alpar@990: _Path p,q; alpar@990: p.addBack(a); alpar@990: q=p; alpar@990: _Path r(p); alpar@990: StaticPath s(r); alpar@990: } alpar@990: alpar@96: int main() { alpar@209: check_concepts(); alpar@990: alpar@990: checkCopy >(); alpar@990: checkCopy >(); alpar@990: checkCopy >(); alpar@990: alpar@990: ListDigraph g; alpar@990: ListDigraph::Arc a = g.addArc(g.addNode(), g.addNode()); alpar@990: alpar@990: Path p; alpar@990: StaticPath q,r; alpar@990: p.addBack(a); alpar@990: q=p; alpar@990: r=q; alpar@990: StaticPath s(q); alpar@990: alpar@96: return 0; alpar@96: }