Index: src/test/Makefile.am
===================================================================
--- src/test/Makefile.am	(revision 919)
+++ src/test/Makefile.am	(revision 937)
@@ -10,4 +10,5 @@
 	dijkstra_test \
 	graph_test \
+	sym_graph_test \
 	graph_wrapper_test \
 	kruskal_test \
@@ -29,4 +30,5 @@
 dijkstra_test_SOURCES = dijkstra_test.cc
 graph_test_SOURCES = graph_test.cc
+sym_graph_test_SOURCES = sym_graph_test.cc
 graph_wrapper_test_SOURCES = graph_wrapper_test.cc
 kruskal_test_SOURCES = kruskal_test.cc
Index: src/test/graph_test.cc
===================================================================
--- src/test/graph_test.cc	(revision 921)
+++ src/test/graph_test.cc	(revision 937)
@@ -64,5 +64,4 @@
     checkGraphInEdgeList(G,n,3);
     checkGraphOutEdgeList(G,n,3);
-    ++n;
   }  
 }
@@ -83,6 +82,6 @@
 
 //Compile SymSmartGraph
-template void lemon::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
-template void lemon::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
+//template void hugo::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
+//template void hugo::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
 
 //Compile ListGraph
@@ -93,7 +92,7 @@
 
 //Compile SymListGraph
-template void lemon::checkCompileGraph<SymListGraph>(SymListGraph &);
-template void lemon::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
-template void lemon::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
+//template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
+//template void hugo::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
+//template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
 
 //Compile FullGraph
@@ -132,12 +131,12 @@
   }
   {
-    SymSmartGraph G;
-    addPetersen(G);
-    checkPetersen(G);
+    //    SymSmartGraph G;
+    //    addPetersen(G);
+    //    checkPetersen(G);
   }
   {
-    SymListGraph G;
-    addPetersen(G);
-    checkPetersen(G);
+    //    SymListGraph G;
+    //    addPetersen(G);
+    //    checkPetersen(G);
   }
 
Index: src/test/graph_test.h
===================================================================
--- src/test/graph_test.h	(revision 921)
+++ src/test/graph_test.h	(revision 937)
@@ -299,4 +299,5 @@
       for(int i=0;i<nn;i++) {
 	check(e!=INVALID,"Wrong OutEdge list linking.");
+	check(n==G.tail(e), "Wrong OutEdge list linking.");
 	++e;
       }
@@ -311,4 +312,5 @@
       for(int i=0;i<nn;i++) {
 	check(e!=INVALID,"Wrong InEdge list linking.");
+	check(n==G.head(e), "Wrong InEdge list linking.");
 	++e;
       }
Index: src/test/sym_graph_test.cc
===================================================================
--- src/test/sym_graph_test.cc	(revision 937)
+++ src/test/sym_graph_test.cc	(revision 937)
@@ -0,0 +1,96 @@
+/* -*- C++ -*-
+ * src/test/sym_graph_test.cc - Part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Combinatorial Optimization Research Group, 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/skeletons/sym_graph.h>
+
+#include<lemon/list_graph.h>
+#include<lemon/smart_graph.h>
+#include<lemon/full_graph.h>
+
+#include"test_tools.h"
+#include"graph_test.h"
+#include"sym_graph_test.h"
+
+/**
+\file
+This test makes consistency checks of list graph structures.
+
+G.addNode(), G.addEdge(), G.tail(), G.head()
+
+\todo Checks for empty graphs and isolated points.
+conversion.
+*/
+
+using namespace lemon;
+
+template<class Graph> void checkPetersen(Graph &G)
+{
+  typedef typename Graph::NodeIt NodeIt;
+
+
+  checkGraphNodeList(G,10);
+  checkGraphEdgeList(G,30);
+  checkGraphSymEdgeList(G,15);
+
+  for(NodeIt n(G);n!=INVALID;++n) {
+    checkGraphInEdgeList(G,n,3);
+    checkGraphOutEdgeList(G,n,3);
+  }  
+}
+
+//Compile Graph
+template void lemon::checkCompileStaticSymGraph<skeleton::StaticSymGraph>
+(skeleton::StaticSymGraph &);
+
+template void lemon::checkCompileSymGraph<skeleton::ExtendableSymGraph>
+(skeleton::ExtendableSymGraph &);
+
+template void lemon::checkCompileErasableSymGraph<skeleton::ErasableSymGraph>
+(skeleton::ErasableSymGraph &);
+
+
+//Compile SymSmartGraph
+template void lemon::checkCompileSymGraph<SymSmartGraph>(SymSmartGraph &);
+template void lemon::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
+
+//Compile SymListGraph
+template void lemon::checkCompileSymGraph<SymListGraph>(SymListGraph &);
+template void lemon::checkCompileErasableSymGraph<SymListGraph>(SymListGraph &);
+template void lemon::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
+
+int main() 
+{
+  {
+    SymSmartGraph G;
+    addSymPetersen(G);
+    checkPetersen(G);
+  }
+  {
+    SymListGraph G;
+    addSymPetersen(G);
+    checkPetersen(G);
+  }
+
+  ///\file
+  ///\todo map tests.
+  ///\todo copy constr tests.
+
+  std::cout << __FILE__ ": All tests passed.\n";
+
+  return 0;
+}
Index: src/test/sym_graph_test.h
===================================================================
--- src/test/sym_graph_test.h	(revision 937)
+++ src/test/sym_graph_test.h	(revision 937)
@@ -0,0 +1,179 @@
+/* -*- C++ -*-
+ * src/test/sym_graph_test.h - Part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Combinatorial Optimization Research Group, 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.
+ *
+ */
+#ifndef LEMON_TEST_SYM_GRAPH_TEST_H
+#define LEMON_TEST_SYM_GRAPH_TEST_H
+
+
+#include "graph_test.h"
+#include "test_tools.h"
+
+//! \ingroup misc
+//! \file
+//! \brief Some utility to test symmetric graph classes.
+namespace lemon {
+
+  template<class Graph> void checkCompileStaticSymGraph(Graph &G) 
+    {
+      typedef typename Graph::Node Node;
+      typedef typename Graph::NodeIt NodeIt;
+      typedef typename Graph::SymEdge SymEdge;
+      typedef typename Graph::SymEdgeIt SymEdgeIt;
+      typedef typename Graph::Edge Edge;
+      typedef typename Graph::EdgeIt EdgeIt;
+      typedef typename Graph::InEdgeIt InEdgeIt;
+      typedef typename Graph::OutEdgeIt OutEdgeIt;
+
+      checkCompileStaticGraph(G);
+  
+      {
+	SymEdge i; SymEdge j(i); SymEdge k(INVALID);
+	i=j;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	b=(i==j); b=(i!=j); b=(i<j);
+	Edge e;
+	e = G.forward(i);
+	e = G.backward(i);
+      }
+      {
+	SymEdgeIt i; SymEdgeIt j(i); SymEdgeIt k(INVALID); SymEdgeIt l(G);
+	i=j;
+	j=G.first(i);
+	j=++i;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	SymEdge n(i);
+	n=i;
+	b=(i==j); b=(i!=j); b=(i<j);
+	//SymEdge ->SymEdgeIt conversion
+	SymEdgeIt ni(G,n);
+      }
+      {
+	Edge i, j;
+	j = G.opposite(i);
+      }      
+      {
+	Node n;
+	SymEdge se;
+	se=INVALID;
+	n=G.tail(se);
+	n=G.head(se);
+      }
+      // id tests
+      { SymEdge n; int i=G.id(n); i=i; }
+      //SymEdgeMap tests
+      {
+	SymEdge k;
+	typename Graph::template SymEdgeMap<int> m(G);
+	typename Graph::template SymEdgeMap<int> const &cm = m;  //Const map
+	//Inicialize with default value
+	typename Graph::template SymEdgeMap<int> mdef(G,12);
+	typename Graph::template SymEdgeMap<int> mm(cm);   //Copy
+	typename Graph::template SymEdgeMap<double> dm(cm); //Copy from another type
+	int v;
+	v=m[k]; m[k]=v; m.set(k,v);
+	v=cm[k];
+    
+	m=cm;  
+	dm=cm; //Copy from another type
+	{
+	  //Check the typedef's
+	  typename Graph::template SymEdgeMap<int>::ValueType val;
+	  val = 1;
+	  typename Graph::template SymEdgeMap<int>::KeyType key;
+	  key = typename Graph::SymEdgeIt(G);
+	}
+      }  
+      { //bool SymEdgeMap
+	SymEdge k;
+	typename Graph::template SymEdgeMap<bool> m(G);
+	typename Graph::template SymEdgeMap<bool> const &cm = m;  //Const map
+	//Inicialize with default value
+	typename Graph::template SymEdgeMap<bool> mdef(G,12);
+	typename Graph::template SymEdgeMap<bool> mm(cm);   //Copy
+	typename Graph::template SymEdgeMap<int> dm(cm); //Copy from another type
+	bool v;
+	v=m[k]; m[k]=v; m.set(k,v);
+	v=cm[k];
+    
+	m=cm;  
+	dm=cm; //Copy from another type
+	m=dm; //Copy to another type
+	{
+	  //Check the typedef's
+	  typename Graph::template SymEdgeMap<bool>::ValueType val;
+	  val=true;
+	  typename Graph::template SymEdgeMap<bool>::KeyType key;
+	  key= typename Graph::SymEdgeIt(G);
+	}
+      }
+    }
+
+  template<class Graph> void checkCompileSymGraph(Graph &G) 
+    {
+      checkCompileStaticSymGraph(G);
+
+      typedef typename Graph::Node Node;
+      typedef typename Graph::NodeIt NodeIt;
+      typedef typename Graph::SymEdge SymEdge;
+      typedef typename Graph::SymEdgeIt SymEdgeIt;
+      typedef typename Graph::Edge Edge;
+      typedef typename Graph::EdgeIt EdgeIt;
+      typedef typename Graph::InEdgeIt InEdgeIt;
+      typedef typename Graph::OutEdgeIt OutEdgeIt;
+  
+      Node n,m;
+      n=G.addNode();
+      m=G.addNode();
+      SymEdge e;
+      e = G.addEdge(n,m); 
+  
+      //  G.clear();
+    }
+
+  template<class Graph> void checkCompileSymGraphEraseSymEdge(Graph &G) 
+    {
+      typename Graph::SymEdge n;
+      G.erase(n);
+    }
+
+  template<class Graph> void checkCompileErasableSymGraph(Graph &G) 
+    {
+      checkCompileSymGraph(G);
+      checkCompileGraphEraseNode(G);
+      checkCompileSymGraphEraseSymEdge(G);
+    }
+
+  template<class Graph> void checkGraphSymEdgeList(Graph &G, int nn)
+    {
+      typedef typename Graph::SymEdgeIt SymEdgeIt;
+
+      SymEdgeIt e(G);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong SymEdge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong SymEdge list linking.");
+    }
+
+  ///\file
+  ///\todo Check head(), tail() as well;
+
+  
+} //namespace lemon
+
+
+#endif
Index: src/test/test_tools.h
===================================================================
--- src/test/test_tools.h	(revision 921)
+++ src/test/test_tools.h	(revision 937)
@@ -68,5 +68,5 @@
 
 ///Adds a Petersen graph to \c G.
-///\return The nodes end edges og the generated graph.
+///\return The nodes and edges of the generated graph.
 
 template<typename Graph>
@@ -88,5 +88,44 @@
 }
 
+///Structure returned by \ref addSymPetersen().
 
+///Structure returned by \ref addSymPetersen().
+///
+template<class Graph> struct SymPetStruct
+{
+  ///Vector containing the outer nodes.
+  std::vector<typename Graph::Node> outer;
+  ///Vector containing the inner nodes.
+  std::vector<typename Graph::Node> inner;
+  ///Vector containing the edges of the inner circle.
+  std::vector<typename Graph::SymEdge> incir;
+  ///Vector containing the edges of the outer circle.
+  std::vector<typename Graph::SymEdge> outcir;
+  ///Vector containing the chord edges.
+  std::vector<typename Graph::SymEdge> chords;
+};
+
+///Adds a Petersen graph to the symmetric \c G.
+
+///Adds a Petersen graph to the symmetric \c G.
+///\return The nodes and edges of the generated graph.
+
+template<typename Graph>
+SymPetStruct<Graph> addSymPetersen(Graph &G,int num=5)
+{
+  SymPetStruct<Graph> n;
+
+  for(int i=0;i<num;i++) {
+    n.outer.push_back(G.addNode());
+    n.inner.push_back(G.addNode());
+  }
+
+ for(int i=0;i<num;i++) {
+   n.chords.push_back(G.addEdge(n.outer[i],n.inner[i]));
+   n.outcir.push_back(G.addEdge(n.outer[i],n.outer[(i+1)%5]));
+   n.incir.push_back(G.addEdge(n.inner[i],n.inner[(i+2)%5]));
+  }
+ return n;
+}
 
 #endif
