Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 1198)
+++ test/CMakeLists.txt	(revision 1203)
@@ -8,14 +8,8 @@
 )
 
-SET(TEST_WITH_VALGRIND "NO" CACHE STRING
-  "Run the test with valgrind (YES/NO).")
-SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.")
-
 SET(TESTS
   adaptors_test
-  arc_look_up_test
   bellman_ford_test
   bfs_test
-  bpgraph_test
   circulation_test
   connectivity_test
@@ -36,6 +30,4 @@
   heap_test
   kruskal_test
-  lgf_reader_writer_test
-  lgf_test
   maps_test
   matching_test
@@ -53,4 +45,5 @@
   suurballe_test
   time_measure_test
+  tsp_test
   unionfind_test
 )
@@ -77,5 +70,4 @@
   TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
   ADD_TEST(lp_test lp_test)
-  ADD_DEPENDENCIES(check lp_test)
 
   IF(WIN32 AND LEMON_HAVE_GLPK)
@@ -93,5 +85,5 @@
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
+      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     )
   ENDIF()
@@ -119,5 +111,4 @@
   TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
   ADD_TEST(mip_test mip_test)
-  ADD_DEPENDENCIES(check mip_test)
 
   IF(WIN32 AND LEMON_HAVE_GLPK)
@@ -135,5 +126,5 @@
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
+      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     )
   ENDIF()
@@ -147,11 +138,5 @@
   ENDIF()
   TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
-    IF(TEST_WITH_VALGRIND)
-      ADD_TEST(${TEST_NAME}
-        valgrind --error-exitcode=1 ${VALGRIND_FLAGS}
-        ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} )
-    ELSE()
-      ADD_TEST(${TEST_NAME} ${TEST_NAME})
-    ENDIF()
+  ADD_TEST(${TEST_NAME} ${TEST_NAME})
   ADD_DEPENDENCIES(check ${TEST_NAME})
 ENDFOREACH()
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 1203)
+++ test/Makefile.am	(revision 1203)
@@ -0,0 +1,107 @@
+if USE_VALGRIND
+TESTS_ENVIRONMENT=$(top_srcdir)/scripts/valgrind-wrapper.sh
+endif
+
+EXTRA_DIST += \
+	test/CMakeLists.txt
+
+noinst_HEADERS += \
+	test/graph_test.h \
+	test/test_tools.h
+
+check_PROGRAMS += \
+	test/adaptors_test \
+	test/bellman_ford_test \
+	test/bfs_test \
+	test/circulation_test \
+	test/connectivity_test \
+	test/counter_test \
+	test/dfs_test \
+	test/digraph_test \
+	test/dijkstra_test \
+	test/dim_test \
+	test/edge_set_test \
+	test/error_test \
+	test/euler_test \
+	test/fractional_matching_test \
+	test/gomory_hu_test \
+	test/graph_copy_test \
+	test/graph_test \
+	test/graph_utils_test \
+	test/hao_orlin_test \
+	test/heap_test \
+	test/kruskal_test \
+	test/maps_test \
+	test/matching_test \
+	test/max_cardinality_search_test \
+	test/max_clique_test \
+	test/min_cost_arborescence_test \
+	test/min_cost_flow_test \
+	test/min_mean_cycle_test \
+	test/nagamochi_ibaraki_test \
+	test/path_test \
+	test/planarity_test \
+	test/preflow_test \
+	test/radix_sort_test \
+	test/random_test \
+	test/suurballe_test \
+	test/test_tools_fail \
+	test/test_tools_pass \
+	test/time_measure_test \
+	test/tsp_test \
+	test/unionfind_test
+
+test_test_tools_pass_DEPENDENCIES = demo
+
+if HAVE_LP
+check_PROGRAMS += test/lp_test
+endif HAVE_LP
+if HAVE_MIP
+check_PROGRAMS += test/mip_test
+endif HAVE_MIP
+
+TESTS += $(check_PROGRAMS)
+XFAIL_TESTS += test/test_tools_fail$(EXEEXT)
+
+test_adaptors_test_SOURCES = test/adaptors_test.cc
+test_bellman_ford_test_SOURCES = test/bellman_ford_test.cc
+test_bfs_test_SOURCES = test/bfs_test.cc
+test_circulation_test_SOURCES = test/circulation_test.cc
+test_counter_test_SOURCES = test/counter_test.cc
+test_connectivity_test_SOURCES = test/connectivity_test.cc
+test_dfs_test_SOURCES = test/dfs_test.cc
+test_digraph_test_SOURCES = test/digraph_test.cc
+test_dijkstra_test_SOURCES = test/dijkstra_test.cc
+test_dim_test_SOURCES = test/dim_test.cc
+test_edge_set_test_SOURCES = test/edge_set_test.cc
+test_error_test_SOURCES = test/error_test.cc
+test_euler_test_SOURCES = test/euler_test.cc
+test_fractional_matching_test_SOURCES = test/fractional_matching_test.cc
+test_gomory_hu_test_SOURCES = test/gomory_hu_test.cc
+test_graph_copy_test_SOURCES = test/graph_copy_test.cc
+test_graph_test_SOURCES = test/graph_test.cc
+test_graph_utils_test_SOURCES = test/graph_utils_test.cc
+test_heap_test_SOURCES = test/heap_test.cc
+test_kruskal_test_SOURCES = test/kruskal_test.cc
+test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc
+test_lp_test_SOURCES = test/lp_test.cc
+test_maps_test_SOURCES = test/maps_test.cc
+test_mip_test_SOURCES = test/mip_test.cc
+test_matching_test_SOURCES = test/matching_test.cc
+test_max_cardinality_search_test_SOURCES = test/max_cardinality_search_test.cc
+test_max_clique_test_SOURCES = test/max_clique_test.cc
+test_min_cost_arborescence_test_SOURCES = test/min_cost_arborescence_test.cc
+test_min_cost_flow_test_SOURCES = test/min_cost_flow_test.cc
+test_min_mean_cycle_test_SOURCES = test/min_mean_cycle_test.cc
+test_nagamochi_ibaraki_test_SOURCES = test/nagamochi_ibaraki_test.cc
+test_path_test_SOURCES = test/path_test.cc
+test_planarity_test_SOURCES = test/planarity_test.cc
+test_preflow_test_SOURCES = test/preflow_test.cc
+test_radix_sort_test_SOURCES = test/radix_sort_test.cc
+test_suurballe_test_SOURCES = test/suurballe_test.cc
+test_random_test_SOURCES = test/random_test.cc
+test_test_tools_fail_SOURCES = test/test_tools_fail.cc
+test_test_tools_pass_SOURCES = test/test_tools_pass.cc
+test_time_measure_test_SOURCES = test/time_measure_test.cc
+test_tsp_test_SOURCES = test/tsp_test.cc
+test_unionfind_test_SOURCES = test/unionfind_test.cc
Index: test/adaptors_test.cc
===================================================================
--- test/adaptors_test.cc	(revision 1159)
+++ test/adaptors_test.cc	(revision 550)
@@ -66,5 +66,4 @@
   Digraph::Arc a2 = digraph.addArc(n1, n3);
   Digraph::Arc a3 = digraph.addArc(n2, n3);
-  ignore_unused_variable_warning(a3);
 
   // Check the adaptor
@@ -101,5 +100,4 @@
   Adaptor::Arc a7 = adaptor.addArc(n1, n4);
   Adaptor::Arc a8 = adaptor.addArc(n1, n2);
-  ignore_unused_variable_warning(a6,a7,a8);
 
   adaptor.erase(a1);
@@ -761,5 +759,4 @@
   Digraph::Arc a2 = digraph.addArc(n1, n3);
   Digraph::Arc a3 = digraph.addArc(n2, n3);
-  ignore_unused_variable_warning(a1,a2,a3);
 
   checkGraphNodeList(adaptor, 6);
@@ -1381,13 +1378,11 @@
 
   // Apply several adaptors on the grid graph
-  typedef Orienter< const GridGraph, GridGraph::EdgeMap<bool> >
-    OrientedGridGraph;
-  typedef SplitNodes<OrientedGridGraph> SplitGridGraph;
+  typedef SplitNodes<Orienter< const GridGraph, GridGraph::EdgeMap<bool> > >
+    SplitGridGraph;
   typedef Undirector<const SplitGridGraph> USplitGridGraph;
   checkConcept<concepts::Digraph, SplitGridGraph>();
   checkConcept<concepts::Graph, USplitGridGraph>();
 
-  OrientedGridGraph oadaptor = orienter(graph, dir_map);
-  SplitGridGraph adaptor = splitNodes(oadaptor);
+  SplitGridGraph adaptor = splitNodes(orienter(graph, dir_map));
   USplitGridGraph uadaptor = undirector(adaptor);
 
Index: test/arc_look_up_test.cc
===================================================================
--- test/arc_look_up_test.cc	(revision 1149)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2009
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <iostream>
-#include "lemon/list_graph.h"
-#include "lemon/lgf_reader.h"
-
-#include "test_tools.h"
-
-using namespace lemon;
-
-const int lgfn = 4;
-const std::string lgf =
-  "@nodes\n"
-"label\n"
-"0\n"
-"1\n"
-"2\n"
-"3\n"
-"4\n"
-"5\n"
-"6\n"
-"@arcs\n"
-"label\n"
-"5 6 0\n"
-"5 4 1\n"
-"4 6 2\n"
-"3 4 3\n"
-"3 4 4\n"
-"3 2 5\n"
-"3 5 6\n"
-"3 5 7\n"
-"3 5 8\n"
-"3 5 9\n"
-"2 4 10\n"
-"2 4 11\n"
-"2 4 12\n"
-"2 4 13\n"
-"1 2 14\n"
-"1 2 15\n"
-"1 0 16\n"
-"1 3 17\n"
-"1 3 18\n"
-"1 3 19\n"
-"1 3 20\n"
-"0 2 21\n"
-"0 2 22\n"
-"0 2 23\n"
-"0 2 24\n";
-
-
-int main() {
-  ListDigraph graph;
-  std::istringstream lgfs(lgf);
-  DigraphReader<ListDigraph>(graph, lgfs).run();
-  
-  AllArcLookUp<ListDigraph> lookup(graph);
-	
-  int numArcs = countArcs(graph);
-	
-  int arcCnt = 0;
-  for(ListDigraph::NodeIt n1(graph); n1 != INVALID; ++n1)
-    for(ListDigraph::NodeIt n2(graph); n2 != INVALID; ++n2)
-      for(ListDigraph::Arc a = lookup(n1, n2); a != INVALID;
-	  a = lookup(n1, n2, a))
-	++arcCnt;
-  check(arcCnt==numArcs, "Wrong total number of arcs");
-
-  return 0;
-}
Index: test/bellman_ford_test.cc
===================================================================
--- test/bellman_ford_test.cc	(revision 1174)
+++ test/bellman_ford_test.cc	(revision 960)
@@ -66,8 +66,6 @@
   Arc e;
   Value l;
-  ignore_unused_variable_warning(l);
   int k=3;
   bool b;
-  ignore_unused_variable_warning(b);
   BF::DistMap d(gr);
   BF::PredMap p(gr);
@@ -150,6 +148,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   bellmanFord(g,LengthMap()).run(Node());
   b = bellmanFord(g,LengthMap()).run(Node(),Node());
@@ -195,5 +191,5 @@
 
   ListPath<Digraph> path;
-  Value dist = 0;
+  Value dist;
   bool reached = bellmanFord(gr,length).path(path).dist(dist).run(s,t);
 
Index: test/bfs_test.cc
===================================================================
--- test/bfs_test.cc	(revision 1173)
+++ test/bfs_test.cc	(revision 956)
@@ -62,5 +62,4 @@
   Arc e;
   int l, i;
-  ignore_unused_variable_warning(l,i);
   bool b;
   BType::DistMap d(G);
@@ -152,6 +151,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   bfs(g).run(Node());
   b=bfs(g).run(Node(),Node());
Index: test/bpgraph_test.cc
===================================================================
--- test/bpgraph_test.cc	(revision 1194)
+++ 	(revision )
@@ -1,451 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2010
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <lemon/concepts/bpgraph.h>
-#include <lemon/list_graph.h>
-#include <lemon/smart_graph.h>
-#include <lemon/full_graph.h>
-
-#include "test_tools.h"
-#include "graph_test.h"
-
-using namespace lemon;
-using namespace lemon::concepts;
-
-template <class BpGraph>
-void checkBpGraphBuild() {
-  TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph);
-
-  BpGraph G;
-  checkGraphNodeList(G, 0);
-  checkGraphRedNodeList(G, 0);
-  checkGraphBlueNodeList(G, 0);
-  checkGraphEdgeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  G.reserveNode(3);
-  G.reserveEdge(3);
-
-  RedNode
-    rn1 = G.addRedNode();
-  checkGraphNodeList(G, 1);
-  checkGraphRedNodeList(G, 1);
-  checkGraphBlueNodeList(G, 0);
-  checkGraphEdgeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  BlueNode
-    bn1 = G.addBlueNode(),
-    bn2 = G.addBlueNode();
-  checkGraphNodeList(G, 3);
-  checkGraphRedNodeList(G, 1);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  Edge e1 = G.addEdge(rn1, bn2);
-  check(G.redNode(e1) == rn1 && G.blueNode(e1) == bn2, "Wrong edge");
-  check(G.u(e1) == rn1 && G.v(e1) == bn2, "Wrong edge");
-
-  checkGraphNodeList(G, 3);
-  checkGraphRedNodeList(G, 1);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 1);
-  checkGraphArcList(G, 2);
-
-  checkGraphIncEdgeArcLists(G, rn1, 1);
-  checkGraphIncEdgeArcLists(G, bn1, 0);
-  checkGraphIncEdgeArcLists(G, bn2, 1);
-
-  checkGraphConEdgeList(G, 1);
-  checkGraphConArcList(G, 2);
-
-  Edge
-    e2 = G.addEdge(bn1, rn1),
-    e3 = G.addEdge(rn1, bn2);
-
-  checkGraphNodeList(G, 3);
-  checkGraphRedNodeList(G, 1);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-
-  checkGraphIncEdgeArcLists(G, rn1, 3);
-  checkGraphIncEdgeArcLists(G, bn1, 1);
-  checkGraphIncEdgeArcLists(G, bn2, 2);
-
-  checkGraphConEdgeList(G, 3);
-  checkGraphConArcList(G, 6);
-
-  checkArcDirections(G);
-
-  checkNodeIds(G);
-  checkRedNodeIds(G);
-  checkBlueNodeIds(G);
-  checkArcIds(G);
-  checkEdgeIds(G);
-
-  checkGraphNodeMap(G);
-  checkGraphRedNodeMap(G);
-  checkGraphBlueNodeMap(G);
-  checkGraphArcMap(G);
-  checkGraphEdgeMap(G);
-}
-
-template <class BpGraph>
-void checkBpGraphErase() {
-  TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph);
-
-  BpGraph G;
-  RedNode
-    n1 = G.addRedNode(), n4 = G.addRedNode(); 
-  BlueNode
-    n2 = G.addBlueNode(), n3 = G.addBlueNode();
-  Edge
-    e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
-    e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
-
-  // Check edge deletion
-  G.erase(e2);
-
-  checkGraphNodeList(G, 4);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-
-  checkGraphIncEdgeArcLists(G, n1, 1);
-  checkGraphIncEdgeArcLists(G, n2, 2);
-  checkGraphIncEdgeArcLists(G, n3, 1);
-  checkGraphIncEdgeArcLists(G, n4, 2);
-
-  checkGraphConEdgeList(G, 3);
-  checkGraphConArcList(G, 6);
-
-  // Check node deletion
-  G.erase(n3);
-
-  checkGraphNodeList(G, 3);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 1);
-  checkGraphEdgeList(G, 2);
-  checkGraphArcList(G, 4);
-
-  checkGraphIncEdgeArcLists(G, n1, 1);
-  checkGraphIncEdgeArcLists(G, n2, 2);
-  checkGraphIncEdgeArcLists(G, n4, 1);
-
-  checkGraphConEdgeList(G, 2);
-  checkGraphConArcList(G, 4);
-
-}
-
-template <class BpGraph>
-void checkBpGraphAlter() {
-  TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph);
-
-  BpGraph G;
-  RedNode
-    n1 = G.addRedNode(), n4 = G.addRedNode(); 
-  BlueNode
-    n2 = G.addBlueNode(), n3 = G.addBlueNode();
-  Edge
-    e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
-    e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
-
-  G.changeRed(e2, n4);
-  check(G.redNode(e2) == n4, "Wrong red node");
-  check(G.blueNode(e2) == n3, "Wrong blue node");
-
-  checkGraphNodeList(G, 4);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 4);
-  checkGraphArcList(G, 8);
-
-  checkGraphIncEdgeArcLists(G, n1, 1);
-  checkGraphIncEdgeArcLists(G, n2, 2);
-  checkGraphIncEdgeArcLists(G, n3, 2);
-  checkGraphIncEdgeArcLists(G, n4, 3);
-
-  checkGraphConEdgeList(G, 4);
-  checkGraphConArcList(G, 8);
-
-  G.changeBlue(e2, n2);
-  check(G.redNode(e2) == n4, "Wrong red node");
-  check(G.blueNode(e2) == n2, "Wrong blue node");
-
-  checkGraphNodeList(G, 4);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 4);
-  checkGraphArcList(G, 8);
-
-  checkGraphIncEdgeArcLists(G, n1, 1);
-  checkGraphIncEdgeArcLists(G, n2, 3);
-  checkGraphIncEdgeArcLists(G, n3, 1);
-  checkGraphIncEdgeArcLists(G, n4, 3);
-
-  checkGraphConEdgeList(G, 4);
-  checkGraphConArcList(G, 8);
-}
-
-
-template <class BpGraph>
-void checkBpGraphSnapshot() {
-  TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph);
-
-  BpGraph G;
-  RedNode
-    n1 = G.addRedNode();
-  BlueNode
-    n2 = G.addBlueNode(),
-    n3 = G.addBlueNode();
-  Edge 
-    e1 = G.addEdge(n1, n2),
-    e2 = G.addEdge(n1, n3);
-
-  checkGraphNodeList(G, 3);
-  checkGraphRedNodeList(G, 1);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 2);
-  checkGraphArcList(G, 4);
-
-  typename BpGraph::Snapshot snapshot(G);
-
-  RedNode n4 = G.addRedNode();
-  G.addEdge(n4, n2);
-  G.addEdge(n4, n3);
-
-  checkGraphNodeList(G, 4);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 4);
-  checkGraphArcList(G, 8);
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 3);
-  checkGraphRedNodeList(G, 1);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 2);
-  checkGraphArcList(G, 4);
-
-  checkGraphIncEdgeArcLists(G, n1, 2);
-  checkGraphIncEdgeArcLists(G, n2, 1);
-  checkGraphIncEdgeArcLists(G, n3, 1);
-
-  checkGraphConEdgeList(G, 2);
-  checkGraphConArcList(G, 4);
-
-  checkNodeIds(G);
-  checkRedNodeIds(G);
-  checkBlueNodeIds(G);
-  checkArcIds(G);
-  checkEdgeIds(G);
-
-  checkGraphNodeMap(G);
-  checkGraphRedNodeMap(G);
-  checkGraphBlueNodeMap(G);
-  checkGraphArcMap(G);
-  checkGraphEdgeMap(G);
-
-  G.addRedNode();
-  snapshot.save(G);
-
-  G.addEdge(G.addRedNode(), G.addBlueNode());
-
-  snapshot.restore();
-  snapshot.save(G);
-
-  checkGraphNodeList(G, 4);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 2);
-  checkGraphArcList(G, 4);
-
-  G.addEdge(G.addRedNode(), G.addBlueNode());
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 4);
-  checkGraphRedNodeList(G, 2);
-  checkGraphBlueNodeList(G, 2);
-  checkGraphEdgeList(G, 2);
-  checkGraphArcList(G, 4);
-}
-
-template <typename BpGraph>
-void checkBpGraphValidity() {
-  TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph);
-  BpGraph g;
-
-  RedNode
-    n1 = g.addRedNode();
-  BlueNode
-    n2 = g.addBlueNode(),
-    n3 = g.addBlueNode();
-
-  Edge
-    e1 = g.addEdge(n1, n2),
-    e2 = g.addEdge(n1, n3);
-
-  check(g.valid(n1), "Wrong validity check");
-  check(g.valid(e1), "Wrong validity check");
-  check(g.valid(g.direct(e1, true)), "Wrong validity check");
-
-  check(!g.valid(g.nodeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.edgeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
-}
-
-void checkConcepts() {
-  { // Checking graph components
-    checkConcept<BaseBpGraphComponent, BaseBpGraphComponent >();
-
-    checkConcept<IDableBpGraphComponent<>,
-      IDableBpGraphComponent<> >();
-
-    checkConcept<IterableBpGraphComponent<>,
-      IterableBpGraphComponent<> >();
-
-    checkConcept<AlterableBpGraphComponent<>,
-      AlterableBpGraphComponent<> >();
-
-    checkConcept<MappableBpGraphComponent<>,
-      MappableBpGraphComponent<> >();
-
-    checkConcept<ExtendableBpGraphComponent<>,
-      ExtendableBpGraphComponent<> >();
-
-    checkConcept<ErasableBpGraphComponent<>,
-      ErasableBpGraphComponent<> >();
-
-    checkConcept<ClearableBpGraphComponent<>,
-      ClearableBpGraphComponent<> >();
-
-  }
-  { // Checking skeleton graph
-    checkConcept<BpGraph, BpGraph>();
-  }
-  { // Checking SmartBpGraph
-    checkConcept<BpGraph, SmartBpGraph>();
-    checkConcept<AlterableBpGraphComponent<>, SmartBpGraph>();
-    checkConcept<ExtendableBpGraphComponent<>, SmartBpGraph>();
-    checkConcept<ClearableBpGraphComponent<>, SmartBpGraph>();
-  }
-}
-
-void checkFullBpGraph(int redNum, int blueNum) {
-  typedef FullBpGraph BpGraph;
-  BPGRAPH_TYPEDEFS(BpGraph);
-
-  BpGraph G(redNum, blueNum);
-  checkGraphNodeList(G, redNum + blueNum);
-  checkGraphRedNodeList(G, redNum);
-  checkGraphBlueNodeList(G, blueNum);
-  checkGraphEdgeList(G, redNum * blueNum);
-  checkGraphArcList(G, 2 * redNum * blueNum);
-
-  G.resize(redNum, blueNum);
-  checkGraphNodeList(G, redNum + blueNum);
-  checkGraphRedNodeList(G, redNum);
-  checkGraphBlueNodeList(G, blueNum);
-  checkGraphEdgeList(G, redNum * blueNum);
-  checkGraphArcList(G, 2 * redNum * blueNum);
-
-  for (RedNodeIt n(G); n != INVALID; ++n) {
-    checkGraphOutArcList(G, n, blueNum);
-    checkGraphInArcList(G, n, blueNum);
-    checkGraphIncEdgeList(G, n, blueNum);
-  }
-
-  for (BlueNodeIt n(G); n != INVALID; ++n) {
-    checkGraphOutArcList(G, n, redNum);
-    checkGraphInArcList(G, n, redNum);
-    checkGraphIncEdgeList(G, n, redNum);
-  }
-
-  checkGraphConArcList(G, 2 * redNum * blueNum);
-  checkGraphConEdgeList(G, redNum * blueNum);
-
-  checkArcDirections(G);
-
-  checkNodeIds(G);
-  checkRedNodeIds(G);
-  checkBlueNodeIds(G);
-  checkArcIds(G);
-  checkEdgeIds(G);
-
-  checkGraphNodeMap(G);
-  checkGraphRedNodeMap(G);
-  checkGraphBlueNodeMap(G);
-  checkGraphArcMap(G);
-  checkGraphEdgeMap(G);
-
-  for (int i = 0; i < G.redNum(); ++i) {
-    check(G.red(G.redNode(i)), "Wrong node");
-    check(G.index(G.redNode(i)) == i, "Wrong index");
-  }
-
-  for (int i = 0; i < G.blueNum(); ++i) {
-    check(G.blue(G.blueNode(i)), "Wrong node");
-    check(G.index(G.blueNode(i)) == i, "Wrong index");
-  }
-
-  for (NodeIt u(G); u != INVALID; ++u) {
-    for (NodeIt v(G); v != INVALID; ++v) {
-      Edge e = G.edge(u, v);
-      Arc a = G.arc(u, v);
-      if (G.red(u) == G.red(v)) {
-        check(e == INVALID, "Wrong edge lookup");
-        check(a == INVALID, "Wrong arc lookup");
-      } else {
-        check((G.u(e) == u && G.v(e) == v) ||
-              (G.u(e) == v && G.v(e) == u), "Wrong edge lookup");
-        check(G.source(a) == u && G.target(a) == v, "Wrong arc lookup");
-      }
-    }
-  }
-
-}
-
-void checkGraphs() {
-  { // Checking ListGraph
-    checkBpGraphBuild<ListBpGraph>();
-    checkBpGraphErase<ListBpGraph>();
-    checkBpGraphAlter<ListBpGraph>();
-    checkBpGraphSnapshot<ListBpGraph>();
-    checkBpGraphValidity<ListBpGraph>();
-  }
-  { // Checking SmartGraph
-    checkBpGraphBuild<SmartBpGraph>();
-    checkBpGraphSnapshot<SmartBpGraph>();
-    checkBpGraphValidity<SmartBpGraph>();
-  }
-  { // Checking FullBpGraph
-    checkFullBpGraph(6, 8);
-    checkFullBpGraph(7, 4);
-  }
-}
-
-int main() {
-  checkConcepts();
-  checkGraphs();
-  return 0;
-}
Index: test/circulation_test.cc
===================================================================
--- test/circulation_test.cc	(revision 1173)
+++ test/circulation_test.cc	(revision 956)
@@ -74,5 +74,4 @@
   VType v;
   bool b;
-  ignore_unused_variable_warning(v,b);
 
   typedef Circulation<Digraph, CapMap, CapMap, SupplyMap>
Index: test/connectivity_test.cc
===================================================================
--- test/connectivity_test.cc	(revision 1159)
+++ test/connectivity_test.cc	(revision 956)
@@ -69,5 +69,4 @@
     Graph g(d);
     Digraph::Node n = d.addNode();
-    ignore_unused_variable_warning(n);
 
     check(stronglyConnected(d), "This digraph is strongly connected");
@@ -247,5 +246,4 @@
     Digraph::Node watch = d.addNode();
     Digraph::Node pants = d.addNode();
-    ignore_unused_variable_warning(watch);
 
     d.addArc(socks, shoe);
Index: test/dfs_test.cc
===================================================================
--- test/dfs_test.cc	(revision 1176)
+++ test/dfs_test.cc	(revision 1010)
@@ -68,6 +68,4 @@
   int l, i;
   bool b;
-  ignore_unused_variable_warning(l,i,b);
-
   DType::DistMap d(G);
   DType::PredMap p(G);
@@ -154,6 +152,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   dfs(g).run(Node());
   b=dfs(g).run(Node(),Node());
Index: test/digraph_test.cc
===================================================================
--- test/digraph_test.cc	(revision 1160)
+++ test/digraph_test.cc	(revision 956)
@@ -65,5 +65,4 @@
       a3 = G.addArc(n2, n3),
       a4 = G.addArc(n2, n3);
-  ignore_unused_variable_warning(a2,a3,a4);
 
   checkGraphNodeList(G, 3);
@@ -94,5 +93,4 @@
   Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
       a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
-  ignore_unused_variable_warning(a1,a2,a3,a4);
 
   Node n4 = G.split(n2);
@@ -128,5 +126,4 @@
       a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3),
       a5 = G.addArc(n2, n4);
-  ignore_unused_variable_warning(a1,a2,a3,a5);
 
   checkGraphNodeList(G, 4);
@@ -208,5 +205,4 @@
       a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1),
       a5 = G.addArc(n2, n4);
-  ignore_unused_variable_warning(a2,a3,a4,a5);
 
   // Check arc deletion
@@ -256,5 +252,4 @@
   Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
       a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
-  ignore_unused_variable_warning(a1,a2,a3,a4);
 
   typename Digraph::Snapshot snapshot(G);
@@ -357,5 +352,4 @@
     e1 = g.addArc(n1, n2),
     e2 = g.addArc(n2, n3);
-  ignore_unused_variable_warning(e2);
 
   check(g.valid(n1), "Wrong validity check");
@@ -443,5 +437,4 @@
     a3 = g.addArc(n2, n3),
     a4 = g.addArc(n2, n3);
-  ignore_unused_variable_warning(a2,a3,a4);
 
   digraphCopy(g, G).nodeRef(nref).run();
Index: test/dijkstra_test.cc
===================================================================
--- test/dijkstra_test.cc	(revision 1173)
+++ test/dijkstra_test.cc	(revision 956)
@@ -66,6 +66,4 @@
   int i;
   bool b;
-  ignore_unused_variable_warning(l,i,b);
-
   DType::DistMap d(G);
   DType::PredMap p(G);
@@ -165,6 +163,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   dijkstra(g,LengthMap()).run(Node());
   b=dijkstra(g,LengthMap()).run(Node(),Node());
Index: test/edge_set_test.cc
===================================================================
--- test/edge_set_test.cc	(revision 1159)
+++ test/edge_set_test.cc	(revision 956)
@@ -45,10 +45,8 @@
 
   Digraph::Arc ga1 = digraph.addArc(n1, n2);
-  ignore_unused_variable_warning(ga1);
 
   ArcSet arc_set(digraph);
 
   Digraph::Arc ga2 = digraph.addArc(n2, n1);
-  ignore_unused_variable_warning(ga2);
 
   checkGraphNodeList(arc_set, 2);
@@ -78,6 +76,4 @@
     a3 = arc_set.addArc(n2, n3),
     a4 = arc_set.addArc(n2, n3);
-  ignore_unused_variable_warning(a2,a3,a4);
-
   checkGraphNodeList(arc_set, 3);
   checkGraphArcList(arc_set, 4);
@@ -115,10 +111,8 @@
 
   Digraph::Arc ga1 = digraph.addArc(n1, n2);
-  ignore_unused_variable_warning(ga1);
 
   ArcSet arc_set(digraph);
 
   Digraph::Arc ga2 = digraph.addArc(n2, n1);
-  ignore_unused_variable_warning(ga2);
 
   checkGraphNodeList(arc_set, 2);
@@ -148,6 +142,4 @@
     a3 = arc_set.addArc(n2, n3),
     a4 = arc_set.addArc(n2, n3);
-  ignore_unused_variable_warning(a2,a3,a4);
-
   checkGraphNodeList(arc_set, 3);
   checkGraphArcList(arc_set, 4);
@@ -199,10 +191,8 @@
 
   Digraph::Arc ga1 = digraph.addArc(n1, n2);
-  ignore_unused_variable_warning(ga1);
 
   EdgeSet edge_set(digraph);
 
   Digraph::Arc ga2 = digraph.addArc(n2, n1);
-  ignore_unused_variable_warning(ga2);
 
   checkGraphNodeList(edge_set, 2);
@@ -241,6 +231,4 @@
     e3 = edge_set.addEdge(n2, n3),
     e4 = edge_set.addEdge(n2, n3);
-  ignore_unused_variable_warning(e2,e3,e4);
-
   checkGraphNodeList(edge_set, 3);
   checkGraphEdgeList(edge_set, 4);
@@ -287,10 +275,8 @@
 
   Digraph::Arc ga1 = digraph.addArc(n1, n2);
-  ignore_unused_variable_warning(ga1);
 
   EdgeSet edge_set(digraph);
 
   Digraph::Arc ga2 = digraph.addArc(n2, n1);
-  ignore_unused_variable_warning(ga2);
 
   checkGraphNodeList(edge_set, 2);
@@ -329,6 +315,4 @@
     e3 = edge_set.addEdge(n2, n3),
     e4 = edge_set.addEdge(n2, n3);
-  ignore_unused_variable_warning(e2,e3,e4);
-
   checkGraphNodeList(edge_set, 3);
   checkGraphEdgeList(edge_set, 4);
Index: test/euler_test.cc
===================================================================
--- test/euler_test.cc	(revision 1159)
+++ test/euler_test.cc	(revision 956)
@@ -102,6 +102,5 @@
     Graph g(d);
     Digraph::Node n = d.addNode();
-    ignore_unused_variable_warning(n);
-  
+
     checkDiEulerIt(d);
     checkDiEulerIt(g);
@@ -191,5 +190,4 @@
     Digraph::Node n4 = d.addNode();
     Digraph::Node n5 = d.addNode();
-    ignore_unused_variable_warning(n0,n4,n5);
 
     d.addArc(n1, n2);
Index: test/fractional_matching_test.cc
===================================================================
--- test/fractional_matching_test.cc	(revision 1160)
+++ test/fractional_matching_test.cc	(revision 956)
@@ -343,5 +343,4 @@
       pv += weight[mwfm.matching(n)];
       SmartGraph::Node o = graph.target(mwfm.matching(n));
-      ignore_unused_variable_warning(o);
     } else {
       check(mwfm.nodeValue(n) == 0, "Invalid matching");
@@ -408,5 +407,4 @@
     pv += weight[mwpfm.matching(n)];
     SmartGraph::Node o = graph.target(mwpfm.matching(n));
-    ignore_unused_variable_warning(o);
   }
 
Index: test/gomory_hu_test.cc
===================================================================
--- test/gomory_hu_test.cc	(revision 1173)
+++ test/gomory_hu_test.cc	(revision 956)
@@ -69,5 +69,4 @@
   Value v;
   int d;
-  ignore_unused_variable_warning(v,d);
 
   GomoryHu<Graph, CapMap> gh_test(g, cap);
Index: test/graph_copy_test.cc
===================================================================
--- test/graph_copy_test.cc	(revision 1194)
+++ test/graph_copy_test.cc	(revision 989)
@@ -210,169 +210,4 @@
 }
 
-template <typename GR>
-void bpgraph_copy_test() {
-  const int nn = 10;
-
-  // Build a graph
-  SmartBpGraph from;
-  SmartBpGraph::NodeMap<int> fnm(from);
-  SmartBpGraph::RedNodeMap<int> frnm(from);
-  SmartBpGraph::BlueNodeMap<int> fbnm(from);
-  SmartBpGraph::ArcMap<int> fam(from);
-  SmartBpGraph::EdgeMap<int> fem(from);
-  SmartBpGraph::Node fn = INVALID;
-  SmartBpGraph::RedNode frn = INVALID;
-  SmartBpGraph::BlueNode fbn = INVALID;
-  SmartBpGraph::Arc fa = INVALID;
-  SmartBpGraph::Edge fe = INVALID;
-
-  std::vector<SmartBpGraph::RedNode> frnv;
-  for (int i = 0; i < nn; ++i) {
-    SmartBpGraph::RedNode node = from.addRedNode();
-    frnv.push_back(node);
-    fnm[node] = i * i;
-    frnm[node] = i + i;
-    if (i == 0) {
-      fn = node;
-      frn = node;
-    }
-  }
-
-  std::vector<SmartBpGraph::BlueNode> fbnv;
-  for (int i = 0; i < nn; ++i) {
-    SmartBpGraph::BlueNode node = from.addBlueNode();
-    fbnv.push_back(node);
-    fnm[node] = i * i;
-    fbnm[node] = i + i;
-    if (i == 0) fbn = node;
-  }
-
-  for (int i = 0; i < nn; ++i) {
-    for (int j = 0; j < nn; ++j) {
-      SmartBpGraph::Edge edge = from.addEdge(frnv[i], fbnv[j]);
-      fem[edge] = i * i + j * j;
-      fam[from.direct(edge, true)] = i + j * j;
-      fam[from.direct(edge, false)] = i * i + j;
-      if (i == 0 && j == 0) fa = from.direct(edge, true);
-      if (i == 0 && j == 0) fe = edge;
-    }
-  }
-
-  // Test graph copy
-  GR to;
-  typename GR::template NodeMap<int> tnm(to);
-  typename GR::template RedNodeMap<int> trnm(to);
-  typename GR::template BlueNodeMap<int> tbnm(to);
-  typename GR::template ArcMap<int> tam(to);
-  typename GR::template EdgeMap<int> tem(to);
-  typename GR::Node tn;
-  typename GR::RedNode trn;
-  typename GR::BlueNode tbn;
-  typename GR::Arc ta;
-  typename GR::Edge te;
-
-  SmartBpGraph::NodeMap<typename GR::Node> nr(from);
-  SmartBpGraph::RedNodeMap<typename GR::RedNode> rnr(from);
-  SmartBpGraph::BlueNodeMap<typename GR::BlueNode> bnr(from);
-  SmartBpGraph::ArcMap<typename GR::Arc> ar(from);
-  SmartBpGraph::EdgeMap<typename GR::Edge> er(from);
-
-  typename GR::template NodeMap<SmartBpGraph::Node> ncr(to);
-  typename GR::template RedNodeMap<SmartBpGraph::RedNode> rncr(to);
-  typename GR::template BlueNodeMap<SmartBpGraph::BlueNode> bncr(to);
-  typename GR::template ArcMap<SmartBpGraph::Arc> acr(to);
-  typename GR::template EdgeMap<SmartBpGraph::Edge> ecr(to);
-
-  bpGraphCopy(from, to).
-    nodeMap(fnm, tnm).
-    redNodeMap(frnm, trnm).blueNodeMap(fbnm, tbnm).
-    arcMap(fam, tam).edgeMap(fem, tem).
-    nodeRef(nr).redRef(rnr).blueRef(bnr).
-    arcRef(ar).edgeRef(er).
-    nodeCrossRef(ncr).redCrossRef(rncr).blueCrossRef(bncr).
-    arcCrossRef(acr).edgeCrossRef(ecr).
-    node(fn, tn).redNode(frn, trn).blueNode(fbn, tbn).
-    arc(fa, ta).edge(fe, te).run();
-
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countRedNodes(from) == countRedNodes(to), "Wrong copy.");
-  check(countBlueNodes(from) == countBlueNodes(to), "Wrong copy.");
-  check(countEdges(from) == countEdges(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
-
-  for (SmartBpGraph::NodeIt it(from); it != INVALID; ++it) {
-    check(ncr[nr[it]] == it, "Wrong copy.");
-    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
-  }
-
-  for (SmartBpGraph::RedNodeIt it(from); it != INVALID; ++it) {
-    check(ncr[nr[it]] == it, "Wrong copy.");
-    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
-    check(rnr[it] == nr[it], "Wrong copy.");
-    check(rncr[rnr[it]] == it, "Wrong copy.");
-    check(frnm[it] == trnm[rnr[it]], "Wrong copy.");
-    check(to.red(rnr[it]), "Wrong copy.");
-  }
-
-  for (SmartBpGraph::BlueNodeIt it(from); it != INVALID; ++it) {
-    check(ncr[nr[it]] == it, "Wrong copy.");
-    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
-    check(bnr[it] == nr[it], "Wrong copy.");
-    check(bncr[bnr[it]] == it, "Wrong copy.");
-    check(fbnm[it] == tbnm[bnr[it]], "Wrong copy.");
-    check(to.blue(bnr[it]), "Wrong copy.");
-  }
-
-  for (SmartBpGraph::ArcIt it(from); it != INVALID; ++it) {
-    check(acr[ar[it]] == it, "Wrong copy.");
-    check(fam[it] == tam[ar[it]], "Wrong copy.");
-    check(nr[from.source(it)] == to.source(ar[it]), "Wrong copy.");
-    check(nr[from.target(it)] == to.target(ar[it]), "Wrong copy.");
-  }
-
-  for (SmartBpGraph::EdgeIt it(from); it != INVALID; ++it) {
-    check(ecr[er[it]] == it, "Wrong copy.");
-    check(fem[it] == tem[er[it]], "Wrong copy.");
-    check(nr[from.u(it)] == to.u(er[it]) || nr[from.u(it)] == to.v(er[it]),
-          "Wrong copy.");
-    check(nr[from.v(it)] == to.u(er[it]) || nr[from.v(it)] == to.v(er[it]),
-          "Wrong copy.");
-    check((from.u(it) != from.v(it)) == (to.u(er[it]) != to.v(er[it])),
-          "Wrong copy.");
-  }
-
-  for (typename GR::NodeIt it(to); it != INVALID; ++it) {
-    check(nr[ncr[it]] == it, "Wrong copy.");
-  }
-  for (typename GR::RedNodeIt it(to); it != INVALID; ++it) {
-    check(rncr[it] == ncr[it], "Wrong copy.");
-    check(rnr[rncr[it]] == it, "Wrong copy.");
-  }
-  for (typename GR::BlueNodeIt it(to); it != INVALID; ++it) {
-    check(bncr[it] == ncr[it], "Wrong copy.");
-    check(bnr[bncr[it]] == it, "Wrong copy.");
-  }
-  for (typename GR::ArcIt it(to); it != INVALID; ++it) {
-    check(ar[acr[it]] == it, "Wrong copy.");
-  }
-  for (typename GR::EdgeIt it(to); it != INVALID; ++it) {
-    check(er[ecr[it]] == it, "Wrong copy.");
-  }
-  check(tn == nr[fn], "Wrong copy.");
-  check(trn == rnr[frn], "Wrong copy.");
-  check(tbn == bnr[fbn], "Wrong copy.");
-  check(ta == ar[fa], "Wrong copy.");
-  check(te == er[fe], "Wrong copy.");
-
-  // Test repeated copy
-  bpGraphCopy(from, to).run();
-  
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countRedNodes(from) == countRedNodes(to), "Wrong copy.");
-  check(countBlueNodes(from) == countBlueNodes(to), "Wrong copy.");
-  check(countEdges(from) == countEdges(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
-}
-
 
 int main() {
@@ -382,6 +217,4 @@
   graph_copy_test<SmartGraph>();
   graph_copy_test<ListGraph>();
-  bpgraph_copy_test<SmartBpGraph>();
-  bpgraph_copy_test<ListBpGraph>();
 
   return 0;
Index: test/graph_test.cc
===================================================================
--- test/graph_test.cc	(revision 1159)
+++ test/graph_test.cc	(revision 956)
@@ -67,5 +67,4 @@
   Edge e2 = G.addEdge(n2, n1),
        e3 = G.addEdge(n2, n3);
-  ignore_unused_variable_warning(e2,e3);
 
   checkGraphNodeList(G, 3);
@@ -100,5 +99,4 @@
        e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
        e5 = G.addEdge(n4, n3);
-  ignore_unused_variable_warning(e1,e3,e4,e5);
 
   checkGraphNodeList(G, 4);
@@ -180,5 +178,4 @@
        e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
        e5 = G.addEdge(n4, n3);
-  ignore_unused_variable_warning(e1,e3,e4,e5);
 
   // Check edge deletion
@@ -221,5 +218,4 @@
   Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
        e3 = G.addEdge(n2, n3);
-  ignore_unused_variable_warning(e1,e2,e3);
 
   checkGraphNodeList(G, 3);
@@ -386,5 +382,4 @@
     e1 = g.addEdge(n1, n2),
     e2 = g.addEdge(n2, n3);
-  ignore_unused_variable_warning(e2);
 
   check(g.valid(n1), "Wrong validity check");
@@ -525,5 +520,4 @@
 
   Node n = G.nodeFromId(dim);
-  ignore_unused_variable_warning(n);
 
   for (NodeIt n(G); n != INVALID; ++n) {
Index: test/graph_test.h
===================================================================
--- test/graph_test.h	(revision 1195)
+++ test/graph_test.h	(revision 463)
@@ -39,40 +39,4 @@
     check(n==INVALID,"Wrong Node list linking.");
     check(countNodes(G)==cnt,"Wrong Node number.");
-  }
-
-  template<class Graph>
-  void checkGraphRedNodeList(const Graph &G, int cnt)
-  {
-    typename Graph::RedNodeIt n(G);
-    for(int i=0;i<cnt;i++) {
-      check(n!=INVALID,"Wrong red Node list linking.");
-      check(G.red(n),"Wrong node set check.");
-      check(!G.blue(n),"Wrong node set check.");
-      typename Graph::Node nn = n;
-      check(G.asRedNodeUnsafe(nn) == n,"Wrong node conversion.");
-      check(G.asRedNode(nn) == n,"Wrong node conversion.");
-      check(G.asBlueNode(nn) == INVALID,"Wrong node conversion.");
-      ++n;
-    }
-    check(n==INVALID,"Wrong red Node list linking.");
-    check(countRedNodes(G)==cnt,"Wrong red Node number.");
-  }
-
-  template<class Graph>
-  void checkGraphBlueNodeList(const Graph &G, int cnt)
-  {
-    typename Graph::BlueNodeIt n(G);
-    for(int i=0;i<cnt;i++) {
-      check(n!=INVALID,"Wrong blue Node list linking.");
-      check(G.blue(n),"Wrong node set check.");
-      check(!G.red(n),"Wrong node set check.");
-      typename Graph::Node nn = n;
-      check(G.asBlueNodeUnsafe(nn) == n,"Wrong node conversion.");
-      check(G.asBlueNode(nn) == n,"Wrong node conversion.");
-      check(G.asRedNode(nn) == INVALID,"Wrong node conversion.");
-      ++n;
-    }
-    check(n==INVALID,"Wrong blue Node list linking.");
-    check(countBlueNodes(G)==cnt,"Wrong blue Node number.");
   }
 
@@ -203,5 +167,4 @@
   template <typename Graph>
   void checkNodeIds(const Graph& G) {
-    typedef typename Graph::Node Node;
     std::set<int> values;
     for (typename Graph::NodeIt n(G); n != INVALID; ++n) {
@@ -211,36 +174,8 @@
       values.insert(G.id(n));
     }
-    check(G.maxId(Node()) <= G.maxNodeId(), "Wrong maximum id");
-  }
-
-  template <typename Graph>
-  void checkRedNodeIds(const Graph& G) {
-    typedef typename Graph::RedNode RedNode;
-    std::set<int> values;
-    for (typename Graph::RedNodeIt n(G); n != INVALID; ++n) {
-      check(G.red(n), "Wrong partition");
-      check(values.find(G.id(n)) == values.end(), "Wrong id");
-      check(G.id(n) <= G.maxRedId(), "Wrong maximum id");
-      values.insert(G.id(n));
-    }
-    check(G.maxId(RedNode()) == G.maxRedId(), "Wrong maximum id");
-  }
-
-  template <typename Graph>
-  void checkBlueNodeIds(const Graph& G) {
-    typedef typename Graph::BlueNode BlueNode;
-    std::set<int> values;
-    for (typename Graph::BlueNodeIt n(G); n != INVALID; ++n) {
-      check(G.blue(n), "Wrong partition");
-      check(values.find(G.id(n)) == values.end(), "Wrong id");
-      check(G.id(n) <= G.maxBlueId(), "Wrong maximum id");
-      values.insert(G.id(n));
-    }
-    check(G.maxId(BlueNode()) == G.maxBlueId(), "Wrong maximum id");
   }
 
   template <typename Graph>
   void checkArcIds(const Graph& G) {
-    typedef typename Graph::Arc Arc;
     std::set<int> values;
     for (typename Graph::ArcIt a(G); a != INVALID; ++a) {
@@ -250,10 +185,8 @@
       values.insert(G.id(a));
     }
-    check(G.maxId(Arc()) <= G.maxArcId(), "Wrong maximum id");
   }
 
   template <typename Graph>
   void checkEdgeIds(const Graph& G) {
-    typedef typename Graph::Edge Edge;
     std::set<int> values;
     for (typename Graph::EdgeIt e(G); e != INVALID; ++e) {
@@ -263,5 +196,4 @@
       values.insert(G.id(e));
     }
-    check(G.maxId(Edge()) <= G.maxEdgeId(), "Wrong maximum id");
   }
 
@@ -297,64 +229,4 @@
 
   template <typename Graph>
-  void checkGraphRedNodeMap(const Graph& G) {
-    typedef typename Graph::Node Node;
-    typedef typename Graph::RedNodeIt RedNodeIt;
-
-    typedef typename Graph::template RedNodeMap<int> IntRedNodeMap;
-    IntRedNodeMap map(G, 42);
-    for (RedNodeIt it(G); it != INVALID; ++it) {
-      check(map[it] == 42, "Wrong map constructor.");
-    }
-    int s = 0;
-    for (RedNodeIt it(G); it != INVALID; ++it) {
-      map[it] = 0;
-      check(map[it] == 0, "Wrong operator[].");
-      map.set(it, s);
-      check(map[it] == s, "Wrong set.");
-      ++s;
-    }
-    s = s * (s - 1) / 2;
-    for (RedNodeIt it(G); it != INVALID; ++it) {
-      s -= map[it];
-    }
-    check(s == 0, "Wrong sum.");
-
-    // map = constMap<Node>(12);
-    // for (NodeIt it(G); it != INVALID; ++it) {
-    //   check(map[it] == 12, "Wrong operator[].");
-    // }
-  }
-
-  template <typename Graph>
-  void checkGraphBlueNodeMap(const Graph& G) {
-    typedef typename Graph::Node Node;
-    typedef typename Graph::BlueNodeIt BlueNodeIt;
-
-    typedef typename Graph::template BlueNodeMap<int> IntBlueNodeMap;
-    IntBlueNodeMap map(G, 42);
-    for (BlueNodeIt it(G); it != INVALID; ++it) {
-      check(map[it] == 42, "Wrong map constructor.");
-    }
-    int s = 0;
-    for (BlueNodeIt it(G); it != INVALID; ++it) {
-      map[it] = 0;
-      check(map[it] == 0, "Wrong operator[].");
-      map.set(it, s);
-      check(map[it] == s, "Wrong set.");
-      ++s;
-    }
-    s = s * (s - 1) / 2;
-    for (BlueNodeIt it(G); it != INVALID; ++it) {
-      s -= map[it];
-    }
-    check(s == 0, "Wrong sum.");
-
-    // map = constMap<Node>(12);
-    // for (NodeIt it(G); it != INVALID; ++it) {
-    //   check(map[it] == 12, "Wrong operator[].");
-    // }
-  }
-
-  template <typename Graph>
   void checkGraphArcMap(const Graph& G) {
     typedef typename Graph::Arc Arc;
Index: test/hao_orlin_test.cc
===================================================================
--- test/hao_orlin_test.cc	(revision 1173)
+++ test/hao_orlin_test.cc	(revision 956)
@@ -67,5 +67,4 @@
   CutMap cut;
   Value v;
-  ignore_unused_variable_warning(v);
 
   HaoOrlin<Digraph, CapMap> ho_test(g, cap);
Index: test/heap_test.cc
===================================================================
--- test/heap_test.cc	(revision 1065)
+++ test/heap_test.cc	(revision 929)
@@ -273,38 +273,4 @@
   }
 
-  {
-    typedef FibHeap<Prio, ItemIntMap> IntHeap;
-    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
-    heapSortTest<IntHeap>();
-    heapIncreaseTest<IntHeap>();
-
-    typedef FibHeap<Prio, IntNodeMap > NodeHeap;
-    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
-    dijkstraHeapTest<NodeHeap>(digraph, length, source);
-  }
-
-  {
-    typedef RadixHeap<ItemIntMap> IntHeap;
-    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
-    heapSortTest<IntHeap>();
-    heapIncreaseTest<IntHeap>();
-
-    typedef RadixHeap<IntNodeMap > NodeHeap;
-    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
-    dijkstraHeapTest<NodeHeap>(digraph, length, source);
-  }
-
-  {
-    typedef BucketHeap<ItemIntMap> IntHeap;
-    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
-    heapSortTest<IntHeap>();
-    heapIncreaseTest<IntHeap>();
-
-    typedef BucketHeap<IntNodeMap > NodeHeap;
-    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
-    dijkstraHeapTest<NodeHeap>(digraph, length, source);
-  }
-
-
   return 0;
 }
Index: test/lgf_reader_writer_test.cc
===================================================================
--- test/lgf_reader_writer_test.cc	(revision 1198)
+++ 	(revision )
@@ -1,578 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2010
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <string>
-
-#include <lemon/concepts/digraph.h>
-#include <lemon/concepts/graph.h>
-#include <lemon/concepts/bpgraph.h>
-
-#include <lemon/list_graph.h>
-#include <lemon/smart_graph.h>
-#include <lemon/lgf_reader.h>
-
-#include "test_tools.h"
-
-struct ReaderConverter {
-  int operator()(const std::string& str) const {
-    return str.length();
-  }
-};
-
-struct WriterConverter {
-  std::string operator()(int value) const {
-    return std::string(value, '*');
-  }
-};
-
-void checkDigraphReaderCompile() {
-  typedef lemon::concepts::ExtendableDigraphComponent<
-    lemon::concepts::Digraph> Digraph;
-  Digraph digraph;
-  Digraph::NodeMap<int> node_map(digraph);
-  Digraph::ArcMap<int> arc_map(digraph);
-  Digraph::Node node;
-  Digraph::Arc arc;
-  int attr;
-
-  lemon::DigraphReader<Digraph> reader(digraph, "filename");
-  reader.nodeMap("node_map", node_map);
-  reader.nodeMap("node_map", node_map, ReaderConverter());
-  reader.arcMap("arc_map", arc_map);
-  reader.arcMap("arc_map", arc_map, ReaderConverter());
-  reader.attribute("attr", attr);
-  reader.attribute("attr", attr, ReaderConverter());
-  reader.node("node", node);
-  reader.arc("arc", arc);
-
-  reader.nodes("alt_nodes_caption");
-  reader.arcs("alt_arcs_caption");
-  reader.attributes("alt_attrs_caption");
-
-  reader.useNodes(node_map);
-  reader.useNodes(node_map, WriterConverter());
-  reader.useArcs(arc_map);
-  reader.useArcs(arc_map, WriterConverter());
-
-  reader.skipNodes();
-  reader.skipArcs();
-
-  reader.run();
-
-  lemon::DigraphReader<Digraph> reader2(digraph, std::cin);
-}
-
-void checkDigraphWriterCompile() {
-  typedef lemon::concepts::Digraph Digraph;
-  Digraph digraph;
-  Digraph::NodeMap<int> node_map(digraph);
-  Digraph::ArcMap<int> arc_map(digraph);
-  Digraph::Node node;
-  Digraph::Arc arc;
-  int attr;
-
-  lemon::DigraphWriter<Digraph> writer(digraph, "filename");
-  writer.nodeMap("node_map", node_map);
-  writer.nodeMap("node_map", node_map, WriterConverter());
-  writer.arcMap("arc_map", arc_map);
-  writer.arcMap("arc_map", arc_map, WriterConverter());
-  writer.attribute("attr", attr);
-  writer.attribute("attr", attr, WriterConverter());
-  writer.node("node", node);
-  writer.arc("arc", arc);
-
-  writer.nodes("alt_nodes_caption");
-  writer.arcs("alt_arcs_caption");
-  writer.attributes("alt_attrs_caption");
-
-  writer.skipNodes();
-  writer.skipArcs();
-
-  writer.run();
-}
-
-void checkGraphReaderCompile() {
-  typedef lemon::concepts::ExtendableGraphComponent<
-    lemon::concepts::Graph> Graph;
-  Graph graph;
-  Graph::NodeMap<int> node_map(graph);
-  Graph::ArcMap<int> arc_map(graph);
-  Graph::EdgeMap<int> edge_map(graph);
-  Graph::Node node;
-  Graph::Arc arc;
-  Graph::Edge edge;
-  int attr;
-
-  lemon::GraphReader<Graph> reader(graph, "filename");
-  reader.nodeMap("node_map", node_map);
-  reader.nodeMap("node_map", node_map, ReaderConverter());
-  reader.arcMap("arc_map", arc_map);
-  reader.arcMap("arc_map", arc_map, ReaderConverter());
-  reader.edgeMap("edge_map", edge_map);
-  reader.edgeMap("edge_map", edge_map, ReaderConverter());
-  reader.attribute("attr", attr);
-  reader.attribute("attr", attr, ReaderConverter());
-  reader.node("node", node);
-  reader.arc("arc", arc);
-
-  reader.nodes("alt_nodes_caption");
-  reader.edges("alt_edges_caption");
-  reader.attributes("alt_attrs_caption");
-
-  reader.useNodes(node_map);
-  reader.useNodes(node_map, WriterConverter());
-  reader.useEdges(edge_map);
-  reader.useEdges(edge_map, WriterConverter());
-
-  reader.skipNodes();
-  reader.skipEdges();
-
-  reader.run();
-
-  lemon::GraphReader<Graph> reader2(graph, std::cin);
-}
-
-void checkGraphWriterCompile() {
-  typedef lemon::concepts::Graph Graph;
-  Graph graph;
-  Graph::NodeMap<int> node_map(graph);
-  Graph::ArcMap<int> arc_map(graph);
-  Graph::EdgeMap<int> edge_map(graph);
-  Graph::Node node;
-  Graph::Arc arc;
-  Graph::Edge edge;
-  int attr;
-
-  lemon::GraphWriter<Graph> writer(graph, "filename");
-  writer.nodeMap("node_map", node_map);
-  writer.nodeMap("node_map", node_map, WriterConverter());
-  writer.arcMap("arc_map", arc_map);
-  writer.arcMap("arc_map", arc_map, WriterConverter());
-  writer.edgeMap("edge_map", edge_map);
-  writer.edgeMap("edge_map", edge_map, WriterConverter());
-  writer.attribute("attr", attr);
-  writer.attribute("attr", attr, WriterConverter());
-  writer.node("node", node);
-  writer.arc("arc", arc);
-  writer.edge("edge", edge);
-
-  writer.nodes("alt_nodes_caption");
-  writer.edges("alt_edges_caption");
-  writer.attributes("alt_attrs_caption");
-
-  writer.skipNodes();
-  writer.skipEdges();
-
-  writer.run();
-
-  lemon::GraphWriter<Graph> writer2(graph, std::cout);
-}
-
-void checkBpGraphReaderCompile() {
-  typedef lemon::concepts::ExtendableBpGraphComponent<
-    lemon::concepts::BpGraph> BpGraph;
-  BpGraph graph;
-  BpGraph::NodeMap<int> node_map(graph);
-  BpGraph::RedNodeMap<int> red_node_map(graph);
-  BpGraph::BlueNodeMap<int> blue_node_map(graph);
-  BpGraph::ArcMap<int> arc_map(graph);
-  BpGraph::EdgeMap<int> edge_map(graph);
-  BpGraph::Node node;
-  BpGraph::RedNode red_node;
-  BpGraph::BlueNode blue_node;
-  BpGraph::Arc arc;
-  BpGraph::Edge edge;
-  int attr;
-
-  lemon::BpGraphReader<BpGraph> reader(graph, "filename");
-  reader.nodeMap("node_map", node_map);
-  reader.nodeMap("node_map", node_map, ReaderConverter());
-  reader.redNodeMap("red_node_map", red_node_map);
-  reader.redNodeMap("red_node_map", red_node_map, ReaderConverter());
-  reader.blueNodeMap("blue_node_map", blue_node_map);
-  reader.blueNodeMap("blue_node_map", blue_node_map, ReaderConverter());
-  reader.arcMap("arc_map", arc_map);
-  reader.arcMap("arc_map", arc_map, ReaderConverter());
-  reader.edgeMap("edge_map", edge_map);
-  reader.edgeMap("edge_map", edge_map, ReaderConverter());
-  reader.attribute("attr", attr);
-  reader.attribute("attr", attr, ReaderConverter());
-  reader.node("node", node);
-  reader.redNode("red_node", red_node);
-  reader.blueNode("blue_node", blue_node);
-  reader.arc("arc", arc);
-
-  reader.nodes("alt_nodes_caption");
-  reader.edges("alt_edges_caption");
-  reader.attributes("alt_attrs_caption");
-
-  reader.useNodes(node_map);
-  reader.useNodes(node_map, WriterConverter());
-  reader.useEdges(edge_map);
-  reader.useEdges(edge_map, WriterConverter());
-
-  reader.skipNodes();
-  reader.skipEdges();
-
-  reader.run();
-
-  lemon::BpGraphReader<BpGraph> reader2(graph, std::cin);
-}
-
-void checkBpGraphWriterCompile() {
-  typedef lemon::concepts::BpGraph BpGraph;
-  BpGraph graph;
-  BpGraph::NodeMap<int> node_map(graph);
-  BpGraph::RedNodeMap<int> red_node_map(graph);
-  BpGraph::BlueNodeMap<int> blue_node_map(graph);
-  BpGraph::ArcMap<int> arc_map(graph);
-  BpGraph::EdgeMap<int> edge_map(graph);
-  BpGraph::Node node;
-  BpGraph::RedNode red_node;
-  BpGraph::BlueNode blue_node;
-  BpGraph::Arc arc;
-  BpGraph::Edge edge;
-  int attr;
-
-  lemon::BpGraphWriter<BpGraph> writer(graph, "filename");
-  writer.nodeMap("node_map", node_map);
-  writer.nodeMap("node_map", node_map, WriterConverter());
-  writer.redNodeMap("red_node_map", red_node_map);
-  writer.redNodeMap("red_node_map", red_node_map, WriterConverter());
-  writer.blueNodeMap("blue_node_map", blue_node_map);
-  writer.blueNodeMap("blue_node_map", blue_node_map, WriterConverter());
-  writer.arcMap("arc_map", arc_map);
-  writer.arcMap("arc_map", arc_map, WriterConverter());
-  writer.edgeMap("edge_map", edge_map);
-  writer.edgeMap("edge_map", edge_map, WriterConverter());
-  writer.attribute("attr", attr);
-  writer.attribute("attr", attr, WriterConverter());
-  writer.node("node", node);
-  writer.redNode("red_node", red_node);
-  writer.blueNode("blue_node", blue_node);
-  writer.arc("arc", arc);
-
-  writer.nodes("alt_nodes_caption");
-  writer.edges("alt_edges_caption");
-  writer.attributes("alt_attrs_caption");
-
-  writer.skipNodes();
-  writer.skipEdges();
-
-  writer.run();
-
-  lemon::BpGraphWriter<BpGraph> writer2(graph, std::cout);
-}
-
-void checkDigraphReaderWriter() {
-  typedef lemon::SmartDigraph Digraph;
-  Digraph digraph;
-  Digraph::Node n1 = digraph.addNode();
-  Digraph::Node n2 = digraph.addNode();
-  Digraph::Node n3 = digraph.addNode();
-
-  Digraph::Arc a1 = digraph.addArc(n1, n2);
-  Digraph::Arc a2 = digraph.addArc(n2, n3);
-
-  Digraph::NodeMap<int> node_map(digraph);
-  node_map[n1] = 11;
-  node_map[n2] = 12;
-  node_map[n3] = 13;
-
-  Digraph::ArcMap<int> arc_map(digraph);
-  arc_map[a1] = 21;
-  arc_map[a2] = 22;
-
-  int attr = 100;
-
-  std::ostringstream os;
-  lemon::DigraphWriter<Digraph> writer(digraph, os);
-
-  writer.nodeMap("node_map1", node_map);
-  writer.nodeMap("node_map2", node_map, WriterConverter());
-  writer.arcMap("arc_map1", arc_map);
-  writer.arcMap("arc_map2", arc_map, WriterConverter());
-  writer.node("node", n2);
-  writer.arc("arc", a1);
-  writer.attribute("attr1", attr);
-  writer.attribute("attr2", attr, WriterConverter());
-
-  writer.run();
-
-  typedef lemon::ListDigraph ExpDigraph;
-  ExpDigraph exp_digraph;
-  ExpDigraph::NodeMap<int> exp_node_map1(exp_digraph);
-  ExpDigraph::NodeMap<int> exp_node_map2(exp_digraph);
-  ExpDigraph::ArcMap<int> exp_arc_map1(exp_digraph);
-  ExpDigraph::ArcMap<int> exp_arc_map2(exp_digraph);
-  ExpDigraph::Node exp_n2;
-  ExpDigraph::Arc exp_a1;
-  int exp_attr1;
-  int exp_attr2;
-
-  std::istringstream is(os.str());
-  lemon::DigraphReader<ExpDigraph> reader(exp_digraph, is);
-
-  reader.nodeMap("node_map1", exp_node_map1);
-  reader.nodeMap("node_map2", exp_node_map2, ReaderConverter());
-  reader.arcMap("arc_map1", exp_arc_map1);
-  reader.arcMap("arc_map2", exp_arc_map2, ReaderConverter());
-  reader.node("node", exp_n2);
-  reader.arc("arc", exp_a1);
-  reader.attribute("attr1", exp_attr1);
-  reader.attribute("attr2", exp_attr2, ReaderConverter());
-
-  reader.run();
-
-  check(lemon::countNodes(exp_digraph) == 3, "Wrong number of nodes");
-  check(lemon::countArcs(exp_digraph) == 2, "Wrong number of arcs");
-  check(exp_node_map1[exp_n2] == 12, "Wrong map value");
-  check(exp_node_map2[exp_n2] == 12, "Wrong map value");
-  check(exp_arc_map1[exp_a1] == 21, "Wrong map value");
-  check(exp_arc_map2[exp_a1] == 21, "Wrong map value");
-  check(exp_attr1 == 100, "Wrong attr value");
-  check(exp_attr2 == 100, "Wrong attr value");
-}
-
-void checkGraphReaderWriter() {
-  typedef lemon::SmartGraph Graph;
-  Graph graph;
-  Graph::Node n1 = graph.addNode();
-  Graph::Node n2 = graph.addNode();
-  Graph::Node n3 = graph.addNode();
-
-  Graph::Edge e1 = graph.addEdge(n1, n2);
-  Graph::Edge e2 = graph.addEdge(n2, n3);
-
-  Graph::NodeMap<int> node_map(graph);
-  node_map[n1] = 11;
-  node_map[n2] = 12;
-  node_map[n3] = 13;
-
-  Graph::EdgeMap<int> edge_map(graph);
-  edge_map[e1] = 21;
-  edge_map[e2] = 22;
-
-  Graph::ArcMap<int> arc_map(graph);
-  arc_map[graph.direct(e1, true)] = 211;
-  arc_map[graph.direct(e1, false)] = 212;
-  arc_map[graph.direct(e2, true)] = 221;
-  arc_map[graph.direct(e2, false)] = 222;
-
-  int attr = 100;
-
-  std::ostringstream os;
-  lemon::GraphWriter<Graph> writer(graph, os);
-
-  writer.nodeMap("node_map1", node_map);
-  writer.nodeMap("node_map2", node_map, WriterConverter());
-  writer.edgeMap("edge_map1", edge_map);
-  writer.edgeMap("edge_map2", edge_map, WriterConverter());
-  writer.arcMap("arc_map1", arc_map);
-  writer.arcMap("arc_map2", arc_map, WriterConverter());
-  writer.node("node", n2); 
-  writer.edge("edge", e1);
-  writer.arc("arc", graph.direct(e1, false));
-  writer.attribute("attr1", attr);
-  writer.attribute("attr2", attr, WriterConverter());
-
-  writer.run();
-
-  typedef lemon::ListGraph ExpGraph;
-  ExpGraph exp_graph;
-  ExpGraph::NodeMap<int> exp_node_map1(exp_graph);
-  ExpGraph::NodeMap<int> exp_node_map2(exp_graph);
-  ExpGraph::EdgeMap<int> exp_edge_map1(exp_graph);
-  ExpGraph::EdgeMap<int> exp_edge_map2(exp_graph);
-  ExpGraph::ArcMap<int> exp_arc_map1(exp_graph);
-  ExpGraph::ArcMap<int> exp_arc_map2(exp_graph);
-  ExpGraph::Node exp_n2;
-  ExpGraph::Edge exp_e1;
-  ExpGraph::Arc exp_a1;
-  int exp_attr1;
-  int exp_attr2;
-
-  std::istringstream is(os.str());
-  lemon::GraphReader<ExpGraph> reader(exp_graph, is);
-
-  reader.nodeMap("node_map1", exp_node_map1);
-  reader.nodeMap("node_map2", exp_node_map2, ReaderConverter());
-  reader.edgeMap("edge_map1", exp_edge_map1);
-  reader.edgeMap("edge_map2", exp_edge_map2, ReaderConverter());
-  reader.arcMap("arc_map1", exp_arc_map1);
-  reader.arcMap("arc_map2", exp_arc_map2, ReaderConverter());
-  reader.node("node", exp_n2);
-  reader.edge("edge", exp_e1);
-  reader.arc("arc", exp_a1);
-  reader.attribute("attr1", exp_attr1);
-  reader.attribute("attr2", exp_attr2, ReaderConverter());
-
-  reader.run();
-
-  check(lemon::countNodes(exp_graph) == 3, "Wrong number of nodes");
-  check(lemon::countEdges(exp_graph) == 2, "Wrong number of edges");
-  check(lemon::countArcs(exp_graph) == 4, "Wrong number of arcs");
-  check(exp_node_map1[exp_n2] == 12, "Wrong map value");
-  check(exp_node_map2[exp_n2] == 12, "Wrong map value");
-  check(exp_edge_map1[exp_e1] == 21, "Wrong map value");
-  check(exp_edge_map2[exp_e1] == 21, "Wrong map value");
-  check(exp_arc_map1[exp_a1] == 212, "Wrong map value");
-  check(exp_arc_map2[exp_a1] == 212, "Wrong map value");
-  check(exp_attr1 == 100, "Wrong attr value");
-  check(exp_attr2 == 100, "Wrong attr value");
-}
-
-void checkBpGraphReaderWriter() {
-  typedef lemon::SmartBpGraph Graph;
-  Graph graph;
-  Graph::RedNode rn1 = graph.addRedNode();
-  Graph::RedNode rn2 = graph.addRedNode();
-  Graph::RedNode rn3 = graph.addRedNode();
-  Graph::BlueNode bn1 = graph.addBlueNode();
-  Graph::BlueNode bn2 = graph.addBlueNode();
-  Graph::Node n = bn1;
-
-  Graph::Edge e1 = graph.addEdge(rn1, bn1);
-  Graph::Edge e2 = graph.addEdge(rn2, bn1);
-
-  Graph::NodeMap<int> node_map(graph);
-  node_map[rn1] = 11;
-  node_map[rn2] = 12;
-  node_map[rn3] = 13;
-  node_map[bn1] = 14;
-  node_map[bn2] = 15;
-
-  Graph::NodeMap<int> red_node_map(graph);
-  red_node_map[rn1] = 411;
-  red_node_map[rn2] = 412;
-  red_node_map[rn3] = 413;
-
-  Graph::NodeMap<int> blue_node_map(graph);
-  blue_node_map[bn1] = 414;
-  blue_node_map[bn2] = 415;
-
-  Graph::EdgeMap<int> edge_map(graph);
-  edge_map[e1] = 21;
-  edge_map[e2] = 22;
-
-  Graph::ArcMap<int> arc_map(graph);
-  arc_map[graph.direct(e1, true)] = 211;
-  arc_map[graph.direct(e1, false)] = 212;
-  arc_map[graph.direct(e2, true)] = 221;
-  arc_map[graph.direct(e2, false)] = 222;
-
-  int attr = 100;
-
-  std::ostringstream os;
-  lemon::BpGraphWriter<Graph> writer(graph, os);
-
-  writer.nodeMap("node_map1", node_map);
-  writer.nodeMap("node_map2", node_map, WriterConverter());
-  writer.nodeMap("red_node_map1", red_node_map);
-  writer.nodeMap("red_node_map2", red_node_map, WriterConverter());
-  writer.nodeMap("blue_node_map1", blue_node_map);
-  writer.nodeMap("blue_node_map2", blue_node_map, WriterConverter());
-  writer.edgeMap("edge_map1", edge_map);
-  writer.edgeMap("edge_map2", edge_map, WriterConverter());
-  writer.arcMap("arc_map1", arc_map);
-  writer.arcMap("arc_map2", arc_map, WriterConverter());
-  writer.node("node", n);
-  writer.redNode("red_node", rn1); 
-  writer.blueNode("blue_node", bn2);
-  writer.edge("edge", e1);
-  writer.arc("arc", graph.direct(e1, false));
-  writer.attribute("attr1", attr);
-  writer.attribute("attr2", attr, WriterConverter());
-
-  writer.run();
-
-  typedef lemon::ListBpGraph ExpGraph;
-  ExpGraph exp_graph;
-  ExpGraph::NodeMap<int> exp_node_map1(exp_graph);
-  ExpGraph::NodeMap<int> exp_node_map2(exp_graph);
-  ExpGraph::RedNodeMap<int> exp_red_node_map1(exp_graph);
-  ExpGraph::RedNodeMap<int> exp_red_node_map2(exp_graph);
-  ExpGraph::BlueNodeMap<int> exp_blue_node_map1(exp_graph);
-  ExpGraph::BlueNodeMap<int> exp_blue_node_map2(exp_graph);
-  ExpGraph::EdgeMap<int> exp_edge_map1(exp_graph);
-  ExpGraph::EdgeMap<int> exp_edge_map2(exp_graph);
-  ExpGraph::ArcMap<int> exp_arc_map1(exp_graph);
-  ExpGraph::ArcMap<int> exp_arc_map2(exp_graph);
-  ExpGraph::Node exp_n;
-  ExpGraph::RedNode exp_rn1;
-  ExpGraph::BlueNode exp_bn2;
-  ExpGraph::Edge exp_e1;
-  ExpGraph::Arc exp_a1;
-  int exp_attr1;
-  int exp_attr2;
-
-  std::istringstream is(os.str());
-  lemon::BpGraphReader<ExpGraph> reader(exp_graph, is);
-
-  reader.nodeMap("node_map1", exp_node_map1);
-  reader.nodeMap("node_map2", exp_node_map2, ReaderConverter());
-  reader.redNodeMap("red_node_map1", exp_red_node_map1);
-  reader.redNodeMap("red_node_map2", exp_red_node_map2, ReaderConverter());
-  reader.blueNodeMap("blue_node_map1", exp_blue_node_map1);
-  reader.blueNodeMap("blue_node_map2", exp_blue_node_map2, ReaderConverter());
-  reader.edgeMap("edge_map1", exp_edge_map1);
-  reader.edgeMap("edge_map2", exp_edge_map2, ReaderConverter());
-  reader.arcMap("arc_map1", exp_arc_map1);
-  reader.arcMap("arc_map2", exp_arc_map2, ReaderConverter());
-  reader.node("node", exp_n);
-  reader.redNode("red_node", exp_rn1);
-  reader.blueNode("blue_node", exp_bn2);
-  reader.edge("edge", exp_e1);
-  reader.arc("arc", exp_a1);
-  reader.attribute("attr1", exp_attr1);
-  reader.attribute("attr2", exp_attr2, ReaderConverter());
-
-  reader.run();
-
-  check(lemon::countNodes(exp_graph) == 5, "Wrong number of nodes");
-  check(lemon::countRedNodes(exp_graph) == 3, "Wrong number of red nodes");
-  check(lemon::countBlueNodes(exp_graph) == 2, "Wrong number of blue nodes");
-  check(lemon::countEdges(exp_graph) == 2, "Wrong number of edges");
-  check(lemon::countArcs(exp_graph) == 4, "Wrong number of arcs");
-  check(exp_node_map1[exp_n] == 14, "Wrong map value");
-  check(exp_node_map2[exp_n] == 14, "Wrong map value");
-  check(exp_red_node_map1[exp_rn1] == 411, "Wrong map value");
-  check(exp_red_node_map2[exp_rn1] == 411, "Wrong map value");
-  check(exp_blue_node_map1[exp_bn2] == 415, "Wrong map value");
-  check(exp_blue_node_map2[exp_bn2] == 415, "Wrong map value");
-  check(exp_edge_map1[exp_e1] == 21, "Wrong map value");
-  check(exp_edge_map2[exp_e1] == 21, "Wrong map value");
-  check(exp_arc_map1[exp_a1] == 212, "Wrong map value");
-  check(exp_arc_map2[exp_a1] == 212, "Wrong map value");
-  check(exp_attr1 == 100, "Wrong attr value");
-  check(exp_attr2 == 100, "Wrong attr value");
-}
-
-
-int main() {
-  { // Check digrpah
-    checkDigraphReaderWriter();
-  }
-  { // Check graph
-    checkGraphReaderWriter();
-  }
-  { // Check bipartite graph
-    checkBpGraphReaderWriter();
-  }
-  return 0;
-}
Index: test/lgf_test.cc
===================================================================
--- test/lgf_test.cc	(revision 1087)
+++ 	(revision )
@@ -1,169 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <lemon/list_graph.h>
-#include <lemon/lgf_reader.h>
-#include "test_tools.h"
-
-using namespace lemon;
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     label\n"
-  "0 1  0\n"
-  "1 0  1\n"
-  "@attributes\n"
-  "source 0\n"
-  "target 1\n";
-
-char test_lgf_nomap[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     -\n"
-  "0 1\n";
-
-char test_lgf_bad1[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     - another\n"
-  "0 1\n";
-
-char test_lgf_bad2[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     label -\n"
-  "0 1\n";
-
-
-int main() 
-{
-  {
-    ListDigraph d; 
-    ListDigraph::Node s,t;
-    ListDigraph::ArcMap<int> label(d);
-    std::istringstream input(test_lgf);
-    digraphReader(d, input).
-      node("source", s).
-      node("target", t).
-      arcMap("label", label).
-      run();
-    check(countNodes(d) == 2,"There should be 2 nodes");
-    check(countArcs(d) == 2,"There should be 2 arcs");
-  }
-  {
-    ListGraph g;
-    ListGraph::Node s,t;
-    ListGraph::EdgeMap<int> label(g);
-    std::istringstream input(test_lgf);
-    graphReader(g, input).
-      node("source", s).
-      node("target", t).
-      edgeMap("label", label).
-      run();
-    check(countNodes(g) == 2,"There should be 2 nodes");
-    check(countEdges(g) == 2,"There should be 2 arcs");
-  }
-
-  {
-    ListDigraph d; 
-    std::istringstream input(test_lgf_nomap);
-    digraphReader(d, input).
-      run();
-    check(countNodes(d) == 2,"There should be 2 nodes");
-    check(countArcs(d) == 1,"There should be 1 arc");
-  }
-  {
-    ListGraph g;
-    std::istringstream input(test_lgf_nomap);
-    graphReader(g, input).
-      run();
-    check(countNodes(g) == 2,"There should be 2 nodes");
-    check(countEdges(g) == 1,"There should be 1 edge");
-  }
-
-  {
-    ListDigraph d; 
-    std::istringstream input(test_lgf_bad1);
-    bool ok=false;
-    try {
-      digraphReader(d, input).
-        run();
-    }
-    catch (FormatError&) 
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-  {
-    ListGraph g;
-    std::istringstream input(test_lgf_bad1);
-    bool ok=false;
-    try {
-      graphReader(g, input).
-        run();
-    }
-    catch (FormatError&)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-
-  {
-    ListDigraph d; 
-    std::istringstream input(test_lgf_bad2);
-    bool ok=false;
-    try {
-      digraphReader(d, input).
-        run();
-    }
-    catch (FormatError&)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-  {
-    ListGraph g;
-    std::istringstream input(test_lgf_bad2);
-    bool ok=false;
-    try {
-      graphReader(g, input).
-        run();
-    }
-    catch (FormatError&)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-}
Index: test/lp_test.cc
===================================================================
--- test/lp_test.cc	(revision 1140)
+++ test/lp_test.cc	(revision 678)
@@ -42,35 +42,8 @@
 using namespace lemon;
 
-int countCols(LpBase & lp) {
-  int count=0;
-  for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
-  return count;
-}
-
-int countRows(LpBase & lp) {
-  int count=0;
-  for (LpBase::RowIt r(lp); r!=INVALID; ++r) ++count;
-  return count;
-}
-
-
 void lpTest(LpSolver& lp)
 {
 
   typedef LpSolver LP;
-
-  // Test LpBase::clear()
-  check(countRows(lp)==0, "Wrong number of rows");
-  check(countCols(lp)==0, "Wrong number of cols");
-  lp.addCol(); lp.addRow(); lp.addRow();
-  check(countRows(lp)==2, "Wrong number of rows");
-  check(countCols(lp)==1, "Wrong number of cols");
-  lp.clear();
-  check(countRows(lp)==0, "Wrong number of rows");
-  check(countCols(lp)==0, "Wrong number of cols");
-  lp.addCol(); lp.addCol(); lp.addCol(); lp.addRow();
-  check(countRows(lp)==1, "Wrong number of rows");
-  check(countCols(lp)==3, "Wrong number of cols");
-  lp.clear();
 
   std::vector<LP::Col> x(10);
@@ -193,12 +166,4 @@
     c = ((2 >= e) >= 3);
     c = ((2 >= p1) >= 3);
-
-    { //Tests for #430
-      LP::Col v=lp.addCol();
-      LP::Constr c = v >= -3;
-      c = c <= 4;
-      LP::Constr c2;
-      c2 = -3 <= v <= 4;
-    }
 
     e[x[3]]=2;
Index: test/maps_test.cc
===================================================================
--- test/maps_test.cc	(revision 1159)
+++ test/maps_test.cc	(revision 956)
@@ -104,5 +104,4 @@
     NullMap<A,B> map1;
     NullMap<A,B> map2 = map1;
-    ignore_unused_variable_warning(map2);
     map1 = nullMap<A,B>();
   }
@@ -115,6 +114,4 @@
     ConstMap<A,B> map2 = B();
     ConstMap<A,B> map3 = map1;
-    ignore_unused_variable_warning(map2,map3);
-
     map1 = constMap<A>(B());
     map1 = constMap<A,B>();
@@ -122,6 +119,4 @@
     ConstMap<A,C> map4(C(1));
     ConstMap<A,C> map5 = map4;
-    ignore_unused_variable_warning(map5);
-
     map4 = constMap<A>(C(2));
     map4.setAll(C(3));
@@ -144,6 +139,4 @@
     IdentityMap<A> map1;
     IdentityMap<A> map2 = map1;
-    ignore_unused_variable_warning(map2);
-
     map1 = identityMap<A>();
 
@@ -205,7 +198,5 @@
     checkConcept<ReadMap<B,double>, CompMap>();
     CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
-    ignore_unused_variable_warning(map1);
     CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
-    ignore_unused_variable_warning(map2);
 
     SparseMap<double, bool> m1(false); m1[3.14] = true;
@@ -220,7 +211,5 @@
     checkConcept<ReadMap<A,double>, CombMap>();
     CombMap map1 = CombMap(DoubleMap(), DoubleMap());
-    ignore_unused_variable_warning(map1);
     CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
-    ignore_unused_variable_warning(map2);
 
     check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
@@ -234,13 +223,9 @@
     FunctorToMap<F> map1;
     FunctorToMap<F> map2 = FunctorToMap<F>(F());
-    ignore_unused_variable_warning(map2);
-
     B b = functorToMap(F())[A()];
-    ignore_unused_variable_warning(b);
 
     checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
     MapToFunctor<ReadMap<A,B> > map =
       MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
-    ignore_unused_variable_warning(map);
 
     check(functorToMap(&func)[A()] == 3,
@@ -260,8 +245,5 @@
       ConvertMap<ReadMap<double, int>, double> >();
     ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
-    ignore_unused_variable_warning(map1);
     ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
-    ignore_unused_variable_warning(map2);
-
   }
 
@@ -660,5 +642,4 @@
     const int num = 10;
     Graph g;
-    Ibm map0(g, true);
     std::vector<Item> items;
     for (int i = 0; i < num; ++i) {
@@ -742,5 +723,4 @@
     const int num = 10;
     Graph g;
-    Iim map0(g, 0);
     std::vector<Item> items;
     for (int i = 0; i < num; ++i) {
@@ -793,5 +773,4 @@
     const int num = 10;
     Graph g;
-    Ivm map0(g, 0.0);
     std::vector<Item> items;
     for (int i = 0; i < num; ++i) {
Index: test/matching_test.cc
===================================================================
--- test/matching_test.cc	(revision 1173)
+++ test/matching_test.cc	(revision 956)
@@ -146,5 +146,4 @@
   MaxMatching<Graph>::Status stat =
     const_mat_test.status(n);
-  ignore_unused_variable_warning(stat);
   const MaxMatching<Graph>::StatusMap& smap =
     const_mat_test.statusMap();
Index: test/max_cardinality_search_test.cc
===================================================================
--- test/max_cardinality_search_test.cc	(revision 1088)
+++ test/max_cardinality_search_test.cc	(revision 1020)
@@ -118,5 +118,5 @@
    maxcard.start(x);
 
-   check(maxcard.processed(s) && !maxcard.processed(x) &&
+   check(maxcard.processed(s) and !maxcard.processed(x) and
          !maxcard.processed(y), "Wrong processed()!");
 
@@ -128,5 +128,5 @@
 
    maxcard.start();
-   check(maxcard.cardinality(x)==2 && maxcard.cardinality(y)>=4,
+   check(maxcard.cardinality(x)==2 and maxcard.cardinality(y)>=4,
          "Wrong cardinalities!");
  }
Index: test/max_clique_test.cc
===================================================================
--- test/max_clique_test.cc	(revision 1022)
+++ test/max_clique_test.cc	(revision 999)
@@ -59,5 +59,5 @@
 // Check with general graphs
 template <typename Param>
-void checkMaxCliqueGeneral(Param rule) {
+void checkMaxCliqueGeneral(int max_sel, Param rule) {
   typedef ListGraph GR;
   typedef GrossoLocatelliPullanMc<GR> McAlg;
@@ -69,11 +69,10 @@
     GR::NodeMap<bool> map(g);
     McAlg mc(g);
-    mc.iterationLimit(50);
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 0, "Wrong clique size");
     check(mc.cliqueSize() == 0, "Wrong clique size");
     check(CliqueIt(mc) == INVALID, "Wrong CliqueNodeIt");
 
     GR::Node u = g.addNode();
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 1, "Wrong clique size");
     check(mc.cliqueSize() == 1, "Wrong clique size");
     mc.cliqueMap(map);
@@ -84,5 +83,5 @@
     
     GR::Node v = g.addNode();
-    check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 1, "Wrong clique size");
     check(mc.cliqueSize() == 1, "Wrong clique size");
     mc.cliqueMap(map);
@@ -92,5 +91,5 @@
 
     g.addEdge(u, v);
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 2, "Wrong clique size");
     check(mc.cliqueSize() == 2, "Wrong clique size");
     mc.cliqueMap(map);
@@ -112,6 +111,5 @@
     
     McAlg mc(g);
-    mc.iterationLimit(50);
-    check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 4, "Wrong clique size");
     check(mc.cliqueSize() == 4, "Wrong clique size");
     mc.cliqueMap(map);
@@ -130,5 +128,5 @@
 // Check with full graphs
 template <typename Param>
-void checkMaxCliqueFullGraph(Param rule) {
+void checkMaxCliqueFullGraph(int max_sel, Param rule) {
   typedef FullGraph GR;
   typedef GrossoLocatelliPullanMc<FullGraph> McAlg;
@@ -139,5 +137,5 @@
     GR::NodeMap<bool> map(g);
     McAlg mc(g);
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == size, "Wrong clique size");
     check(mc.cliqueSize() == size, "Wrong clique size");
     mc.cliqueMap(map);
@@ -153,19 +151,9 @@
 // Check with grid graphs
 template <typename Param>
-void checkMaxCliqueGridGraph(Param rule) {
+void checkMaxCliqueGridGraph(int max_sel, Param rule) {
   GridGraph g(5, 7);
   GridGraph::NodeMap<char> map(g);
   GrossoLocatelliPullanMc<GridGraph> mc(g);
-  
-  mc.iterationLimit(100);
-  check(mc.run(rule) == mc.ITERATION_LIMIT, "Wrong termination cause");
-  check(mc.cliqueSize() == 2, "Wrong clique size");
-
-  mc.stepLimit(100);
-  check(mc.run(rule) == mc.STEP_LIMIT, "Wrong termination cause");
-  check(mc.cliqueSize() == 2, "Wrong clique size");
-
-  mc.sizeLimit(2);
-  check(mc.run(rule) == mc.SIZE_LIMIT, "Wrong termination cause");
+  check(mc.run(max_sel, rule) == 2, "Wrong clique size");
   check(mc.cliqueSize() == 2, "Wrong clique size");
 }
@@ -173,15 +161,15 @@
 
 int main() {
-  checkMaxCliqueGeneral(GrossoLocatelliPullanMc<ListGraph>::RANDOM);
-  checkMaxCliqueGeneral(GrossoLocatelliPullanMc<ListGraph>::DEGREE_BASED);
-  checkMaxCliqueGeneral(GrossoLocatelliPullanMc<ListGraph>::PENALTY_BASED);
+  checkMaxCliqueGeneral(50, GrossoLocatelliPullanMc<ListGraph>::RANDOM);
+  checkMaxCliqueGeneral(50, GrossoLocatelliPullanMc<ListGraph>::DEGREE_BASED);
+  checkMaxCliqueGeneral(50, GrossoLocatelliPullanMc<ListGraph>::PENALTY_BASED);
 
-  checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::RANDOM);
-  checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED);
-  checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED);
+  checkMaxCliqueFullGraph(50, GrossoLocatelliPullanMc<FullGraph>::RANDOM);
+  checkMaxCliqueFullGraph(50, GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED);
+  checkMaxCliqueFullGraph(50, GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED);
                        
-  checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::RANDOM);
-  checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED);
-  checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED);
+  checkMaxCliqueGridGraph(50, GrossoLocatelliPullanMc<GridGraph>::RANDOM);
+  checkMaxCliqueGridGraph(50, GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED);
+  checkMaxCliqueGridGraph(50, GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED);
                        
   return 0;
Index: test/min_cost_arborescence_test.cc
===================================================================
--- test/min_cost_arborescence_test.cc	(revision 1173)
+++ test/min_cost_arborescence_test.cc	(revision 956)
@@ -92,5 +92,4 @@
   VType c;
   bool b;
-  ignore_unused_variable_warning(c,b);
   int i;
   CostMap cost;
Index: test/min_mean_cycle_test.cc
===================================================================
--- test/min_mean_cycle_test.cc	(revision 1178)
+++ test/min_mean_cycle_test.cc	(revision 956)
@@ -111,5 +111,5 @@
                  int cost, int size) {
   MMC alg(gr, lm);
-  check(alg.findCycleMean(), "Wrong result");
+  alg.findCycleMean();
   check(alg.cycleMean() == static_cast<double>(cost) / size,
         "Wrong cycle mean");
@@ -211,11 +211,4 @@
     checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l3, c3,  0, 1);
     checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l4, c4, -1, 1);
-    
-    // Howard with iteration limit
-    HowardMmc<GR, IntArcMap> mmc(gr, l1);
-    check((mmc.findCycleMean(2) == HowardMmc<GR, IntArcMap>::ITERATION_LIMIT),
-      "Wrong termination cause");
-    check((mmc.findCycleMean(4) == HowardMmc<GR, IntArcMap>::OPTIMAL),
-      "Wrong termination cause");
   }
 
Index: test/nagamochi_ibaraki_test.cc
===================================================================
--- test/nagamochi_ibaraki_test.cc	(revision 1177)
+++ test/nagamochi_ibaraki_test.cc	(revision 1017)
@@ -66,5 +66,4 @@
   Value v;
   bool b;
-  ignore_unused_variable_warning(v,b);
 
   NagamochiIbaraki<Graph, CapMap> ni_test(g, cap);
Index: test/path_test.cc
===================================================================
--- test/path_test.cc	(revision 1144)
+++ test/path_test.cc	(revision 463)
@@ -39,35 +39,6 @@
 }
 
-// Check if proper copy consructor is called (use valgrind for testing)
-template<class _Path>
-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<ListDigraph> s(r);
-}
-  
 int main() {
   check_concepts();
-
-  checkCopy<Path<ListDigraph> >();
-  checkCopy<SimplePath<ListDigraph> >();
-  checkCopy<ListPath<ListDigraph> >();
-
-  ListDigraph g;
-  ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
-  
-  Path<ListDigraph> p;
-  StaticPath<ListDigraph> q,r;
-  p.addBack(a);
-  q=p;
-  r=q;
-  StaticPath<ListDigraph> s(q);
-
   return 0;
 }
Index: test/preflow_test.cc
===================================================================
--- test/preflow_test.cc	(revision 1173)
+++ test/preflow_test.cc	(revision 956)
@@ -87,5 +87,4 @@
   VType v;
   bool b;
-  ignore_unused_variable_warning(v,b);
 
   typedef Preflow<Digraph, CapMap>
@@ -158,28 +157,4 @@
 }
 
-void initFlowTest()
-{
-  DIGRAPH_TYPEDEFS(SmartDigraph);
-  
-  SmartDigraph g;
-  SmartDigraph::ArcMap<int> cap(g),iflow(g);
-  Node s=g.addNode(); Node t=g.addNode();
-  Node n1=g.addNode(); Node n2=g.addNode();
-  Arc a;
-  a=g.addArc(s,n1); cap[a]=20; iflow[a]=20;
-  a=g.addArc(n1,n2); cap[a]=10; iflow[a]=0;
-  a=g.addArc(n2,t); cap[a]=20; iflow[a]=0;
-
-  Preflow<SmartDigraph> pre(g,cap,s,t);
-  pre.init(iflow);
-  pre.startFirstPhase();
-  check(pre.flowValue() == 10, "The incorrect max flow value.");
-  check(pre.minCut(s), "Wrong min cut (Node s).");
-  check(pre.minCut(n1), "Wrong min cut (Node n1).");
-  check(!pre.minCut(n2), "Wrong min cut (Node n2).");
-  check(!pre.minCut(t), "Wrong min cut (Node t).");
-}
-
-
 int main() {
 
@@ -272,6 +247,4 @@
         "The max flow value or the three min cut values are incorrect.");
 
-  initFlowTest();
-  
   return 0;
 }
Index: test/suurballe_test.cc
===================================================================
--- test/suurballe_test.cc	(revision 1173)
+++ test/suurballe_test.cc	(revision 956)
@@ -118,6 +118,4 @@
   int f;
   VType c;
-  ignore_unused_variable_warning(f,c);
-
   c = const_suurb_test.totalLength();
   f = const_suurb_test.flow(e);
Index: test/time_measure_test.cc
===================================================================
--- test/time_measure_test.cc	(revision 1157)
+++ test/time_measure_test.cc	(revision 605)
@@ -18,5 +18,4 @@
 
 #include <lemon/time_measure.h>
-#include <lemon/concept_check.h>
 
 using namespace lemon;
@@ -34,8 +33,5 @@
 
   for(int i=0;i<1000;i++)
-    {
-      TimeStamp x(T);
-      ignore_unused_variable_warning(x);
-    }
+    TimeStamp x(T);
 }
 
Index: test/tsp_test.cc
===================================================================
--- test/tsp_test.cc	(revision 1203)
+++ test/tsp_test.cc	(revision 1203)
@@ -0,0 +1,278 @@
+/* -*- mode: C++; indent-tabs-mode: nil; -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library.
+ *
+ * Copyright (C) 2003-2010
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#include <iostream>
+
+#include <lemon/full_graph.h>
+#include <lemon/math.h>
+#include <lemon/maps.h>
+#include <lemon/random.h>
+#include <lemon/dim2.h>
+
+#include <lemon/nearest_neighbor_tsp.h>
+#include <lemon/greedy_tsp.h>
+#include <lemon/insertion_tsp.h>
+#include <lemon/christofides_tsp.h>
+#include <lemon/opt2_tsp.h>
+
+#include "test_tools.h"
+
+using namespace lemon;
+
+// // Tests checkMetricCost() function
+// void metricCostTest() {
+//   GRAPH_TYPEDEFS(FullGraph);
+//   FullGraph g(10);
+//   check(checkMetricCost(g, constMap<Edge>(0)), "Wrong checkMetricCost()");
+//   check(checkMetricCost(g, constMap<Edge>(1)), "Wrong checkMetricCost()");
+//   check(!checkMetricCost(g, constMap<Edge>(-1)), "Wrong checkMetricCost()");
+//   
+//   FullGraph::EdgeMap<float> cost(g);
+//   for (NodeIt u(g); u != INVALID; ++u) {
+//     for (NodeIt v(g); v != INVALID; ++v) {
+//       if (u == v) continue;
+//       float x1 = g.id(u), x2 = g.id(v);
+//       float y1 = x1 * x1, y2 = x2 * x2;
+//       cost[g.edge(u, v)] = std::sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
+//     }
+//   }
+//   check(checkMetricCost(g, cost), "Wrong checkMetricCost()");
+//   float eps = Tolerance<float>::defaultEpsilon();
+//   cost[g.edge(g(0), g(9))] =
+//     cost[g.edge(g(0), g(8))] + cost[g.edge(g(8), g(9))] + eps * 2;
+//   check(!checkMetricCost(g, cost), "Wrong checkMetricCost()");
+//   check(checkMetricCost(g, cost, Tolerance<float>(eps * 4)),
+//     "Wrong checkMetricCost()");
+// }
+
+// Checks tour validity
+bool checkTour(const FullGraph &gr, const std::vector<FullGraph::Node> &p) {
+  FullGraph::NodeMap<bool> used(gr, false);
+  
+  int nodes = 0;
+  for (int i = 0; i < int(p.size()); ++i) {
+    if (used[p[i]]) return false;
+    used[p[i]] = true;
+    ++nodes;
+  }
+  
+  return (nodes == gr.nodeNum());
+}
+
+// Checks tour validity
+bool checkTour(const FullGraph &gr, const Path<FullGraph> &p) {
+  FullGraph::NodeMap<bool> used(gr, false);
+  
+  if (!checkPath(gr, p)) return false;
+  if (gr.nodeNum() <= 1 && p.length() != 0) return false;
+  if (gr.nodeNum() > 1 && p.length() != gr.nodeNum()) return false;
+
+  for (int i = 0; i < p.length(); ++i) {
+    if (used[gr.target(p.nth(i))]) return false;
+    used[gr.target(p.nth(i))] = true;
+  }
+  return true;
+}
+
+// Checks tour cost
+template <typename CostMap>
+bool checkCost(const FullGraph &gr, const std::vector<FullGraph::Node> &p,
+               const CostMap &cost, typename CostMap::Value total)
+{
+  typedef typename CostMap::Value Cost;
+
+  Cost s = 0;
+  for (int i = 0; i < int(p.size()) - 1; ++i)
+    s += cost[gr.edge(p[i], p[i+1])];
+  if (int(p.size()) >= 2)
+    s += cost[gr.edge(p.back(), p.front())];
+
+  return !Tolerance<Cost>().different(s, total);
+}
+
+// Checks tour cost
+template <typename CostMap>
+bool checkCost(const FullGraph &, const Path<FullGraph> &p,
+               const CostMap &cost, typename CostMap::Value total)
+{
+  typedef typename CostMap::Value Cost;
+
+  Cost s = 0;
+  for (int i = 0; i < p.length(); ++i)
+    s += cost[p.nth(i)];
+
+  return !Tolerance<Cost>().different(s, total);
+}
+
+// Tests a TSP algorithm on small graphs
+template <typename TSP>
+void tspTestSmall(const std::string &alg_name) {
+  GRAPH_TYPEDEFS(FullGraph);
+
+  for (int n = 0; n <= 5; ++n) {
+    FullGraph g(n);
+    unsigned nsize = n;
+    int esize = n <= 1 ? 0 : n;
+
+    TSP alg(g, constMap<Edge, int>(1));
+
+    check(alg.run() == esize, alg_name + ": Wrong total cost");
+    check(alg.tourCost() == esize, alg_name + ": Wrong total cost");
+
+    std::list<Node> list;
+    std::vector<Node> vec;
+    alg.tourNodes(list);
+    alg.tourNodes(vec);
+    check(list.size() == nsize, alg_name + ": Wrong node sequence");
+    check(vec.size() == nsize,  alg_name + ": Wrong node sequence");
+    check(alg.tourNodes().size() == nsize, alg_name + ": Wrong node sequence");
+    check(checkTour(g, vec), alg_name + ": Wrong node sequence");
+    check(checkCost(g, vec, constMap<Edge, int>(1), esize),
+      alg_name + ": Wrong tour cost");
+
+    SimplePath<FullGraph> path;
+    alg.tour(path);
+    check(path.length() == esize, alg_name + ": Wrong tour");
+    check(checkTour(g, path), alg_name + ": Wrong tour");
+    check(checkCost(g, path, constMap<Edge, int>(1), esize),
+      alg_name + ": Wrong tour cost");
+  }
+}
+
+// Tests a TSP algorithm on random graphs
+template <typename TSP>
+void tspTestRandom(const std::string &alg_name) {
+  GRAPH_TYPEDEFS(FullGraph);
+
+  FullGraph g(20);
+  FullGraph::NodeMap<dim2::Point<double> > pos(g);
+  DoubleEdgeMap cost(g);
+
+  TSP alg(g, cost);
+  Opt2Tsp<DoubleEdgeMap > opt2(g, cost);
+
+  for (int i = 1; i <= 3; i++) {
+    for (NodeIt u(g); u != INVALID; ++u) {
+      pos[u] = dim2::Point<double>(rnd(), rnd());
+    }
+    for (NodeIt u(g); u != INVALID; ++u) {
+      for (NodeIt v(g); v != INVALID; ++v) {
+        if (u == v) continue;
+        cost[g.edge(u, v)] = (pos[u] - pos[v]).normSquare();
+      }
+    }
+    
+    check(alg.run() > 0, alg_name + ": Wrong total cost");
+
+    std::vector<Node> vec;
+    alg.tourNodes(vec);
+    check(checkTour(g, vec), alg_name + ": Wrong node sequence");
+    check(checkCost(g, vec, cost, alg.tourCost()),
+      alg_name + ": Wrong tour cost");
+
+    SimplePath<FullGraph> path;
+    alg.tour(path);
+    check(checkTour(g, path), alg_name + ": Wrong tour");
+    check(checkCost(g, path, cost, alg.tourCost()),
+      alg_name + ": Wrong tour cost");
+    
+    check(!Tolerance<double>().less(alg.tourCost(), opt2.run(alg.tourNodes())),
+      "2-opt improvement: Wrong total cost");
+    check(checkTour(g, opt2.tourNodes()),
+      "2-opt improvement: Wrong node sequence");
+    check(checkCost(g, opt2.tourNodes(), cost, opt2.tourCost()),
+      "2-opt improvement: Wrong tour cost");
+    
+    check(!Tolerance<double>().less(alg.tourCost(), opt2.run(path)),
+      "2-opt improvement: Wrong total cost");
+    check(checkTour(g, opt2.tourNodes()),
+      "2-opt improvement: Wrong node sequence");
+    check(checkCost(g, opt2.tourNodes(), cost, opt2.tourCost()),
+      "2-opt improvement: Wrong tour cost");
+  }
+}
+
+// Algorithm class for Nearest Insertion 
+template <typename CM>
+class NearestInsertionTsp : public InsertionTsp<CM> {
+public:
+  NearestInsertionTsp(const FullGraph &gr, const CM &cost)
+    : InsertionTsp<CM>(gr, cost) {}
+  typename CM::Value run() {
+    return InsertionTsp<CM>::run(InsertionTsp<CM>::NEAREST);
+  }
+};
+
+// Algorithm class for Farthest Insertion 
+template <typename CM>
+class FarthestInsertionTsp : public InsertionTsp<CM> {
+public:
+  FarthestInsertionTsp(const FullGraph &gr, const CM &cost)
+    : InsertionTsp<CM>(gr, cost) {}
+  typename CM::Value run() {
+    return InsertionTsp<CM>::run(InsertionTsp<CM>::FARTHEST);
+  }
+};
+
+// Algorithm class for Cheapest Insertion 
+template <typename CM>
+class CheapestInsertionTsp : public InsertionTsp<CM> {
+public:
+  CheapestInsertionTsp(const FullGraph &gr, const CM &cost)
+    : InsertionTsp<CM>(gr, cost) {}
+  typename CM::Value run() {
+    return InsertionTsp<CM>::run(InsertionTsp<CM>::CHEAPEST);
+  }
+};
+
+// Algorithm class for Random Insertion 
+template <typename CM>
+class RandomInsertionTsp : public InsertionTsp<CM> {
+public:
+  RandomInsertionTsp(const FullGraph &gr, const CM &cost)
+    : InsertionTsp<CM>(gr, cost) {}
+  typename CM::Value run() {
+    return InsertionTsp<CM>::run(InsertionTsp<CM>::RANDOM);
+  }
+};
+
+int main() {
+  GRAPH_TYPEDEFS(FullGraph);
+
+  // metricCostTest();
+
+  tspTestSmall<NearestNeighborTsp<ConstMap<Edge, int> > >("Nearest Neighbor");
+  tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy");
+  tspTestSmall<NearestInsertionTsp<ConstMap<Edge, int> > >("Nearest Insertion");
+  tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > >("Farthest Insertion");
+  tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > >("Cheapest Insertion");
+  tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion");
+  tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides");
+  tspTestSmall<Opt2Tsp<ConstMap<Edge, int> > >("2-opt");
+
+  tspTestRandom<NearestNeighborTsp<DoubleEdgeMap > >("Nearest Neighbor");
+  tspTestRandom<GreedyTsp<DoubleEdgeMap > >("Greedy");
+  tspTestRandom<NearestInsertionTsp<DoubleEdgeMap > >("Nearest Insertion");
+  tspTestRandom<FarthestInsertionTsp<DoubleEdgeMap > >("Farthest Insertion");
+  tspTestRandom<CheapestInsertionTsp<DoubleEdgeMap > >("Cheapest Insertion");
+  tspTestRandom<RandomInsertionTsp<DoubleEdgeMap > >("Random Insertion");
+  tspTestRandom<ChristofidesTsp<DoubleEdgeMap > >("Christofides");
+  tspTestRandom<Opt2Tsp<DoubleEdgeMap > >("2-opt");
+
+  return 0;
+}
