diff -r 4317d277ba21 -r 765619b7cbb2 test/dfs_test.cc --- a/test/dfs_test.cc Sun Jul 13 16:46:56 2008 +0100 +++ b/test/dfs_test.cc Sun Jul 13 19:51:02 2008 +0100 @@ -1,6 +1,6 @@ -/* -*- C++ -*- +/* -*- mode: C++; indent-tabs-mode: nil; -*- * - * This file is a part of LEMON, a generic C++ optimization library + * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport @@ -27,11 +27,11 @@ using namespace lemon; -void checkDfsCompile() +void checkDfsCompile() { typedef concepts::Digraph Digraph; typedef Dfs DType; - + Digraph G; Digraph::Node n; Digraph::Arc e; @@ -40,11 +40,11 @@ DType::DistMap d(G); DType::PredMap p(G); // DType::PredNodeMap pn(G); - + DType dfs_test(G); - + dfs_test.run(n); - + l = dfs_test.dist(n); e = dfs_test.predArc(n); n = dfs_test.predNode(n); @@ -56,13 +56,13 @@ Path pp = dfs_test.path(n); } -void checkDfsFunctionCompile() +void checkDfsFunctionCompile() { typedef int VType; typedef concepts::Digraph Digraph; typedef Digraph::Arc Arc; typedef Digraph::Node Node; - + Digraph g; dfs(g,Node()).run(); dfs(g).source(Node()).run(); @@ -71,7 +71,7 @@ .distMap(concepts::WriteMap()) .reachedMap(concepts::ReadWriteMap()) .processedMap(concepts::WriteMap()) - .run(Node()); + .run(Node()); } template @@ -81,19 +81,19 @@ Digraph G; Node s, t; PetStruct ps = addPetersen(G, 5); - + s=ps.outer[2]; t=ps.inner[0]; - + Dfs dfs_test(G); - dfs_test.run(s); - + dfs_test.run(s); + Path p = dfs_test.path(t); check(p.length() == dfs_test.dist(t),"path() found a wrong path."); check(checkPath(G, p),"path() found a wrong path."); check(pathSource(G, p) == s,"path() found a wrong path."); check(pathTarget(G, p) == t,"path() found a wrong path."); - + for(NodeIt v(G); v!=INVALID; ++v) { check(dfs_test.reached(v),"Each node should be reached."); if ( dfs_test.predArc(v)!=INVALID ) { @@ -101,8 +101,8 @@ Node u=G.source(e); check(u==dfs_test.predNode(v),"Wrong tree."); check(dfs_test.dist(v) - dfs_test.dist(u) == 1, - "Wrong distance. (" << dfs_test.dist(u) << "->" - <" + <