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