[Lemon-commits] [lemon_svn] alpar: r771 - in hugo/trunk/src: hugo test work/alpar

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:41:24 CET 2006


Author: alpar
Date: Sun May  9 18:29:53 2004
New Revision: 771

Added:
   hugo/trunk/src/hugo/full_graph.h
      - copied unchanged from r770, /hugo/trunk/src/work/alpar/fullgraph.h
Removed:
   hugo/trunk/src/work/alpar/fullgraph.h
Modified:
   hugo/trunk/src/test/graph_test.cc

Log:
The file src/work/alpar/fullgraph.h renamed and moved to src/hugo/full_graph.h.
Compilation tests for FullGraph added to src/test/graph_test.h.


Modified: hugo/trunk/src/test/graph_test.cc
==============================================================================
--- hugo/trunk/src/test/graph_test.cc	(original)
+++ hugo/trunk/src/test/graph_test.cc	Sun May  9 18:29:53 2004
@@ -2,6 +2,7 @@
 #include<hugo/smart_graph.h>
 #include<hugo/skeletons/graph.h>
 #include<hugo/list_graph.h>
+#include<hugo/full_graph.h>
 
 #include"test_tools.h"
 
@@ -10,11 +11,12 @@
 
 G.addNode(), G.addEdge(), G.valid(), G.tail(), G.head()
 
+\todo Checks for empty graphs and isolated points.
 */
 
 using namespace hugo;
 
-template<class Graph> void checkCompile(Graph &G) 
+template<class Graph> void checkCompileStaticGraph(Graph &G) 
 {
   typedef typename Graph::Node Node;
   typedef typename Graph::NodeIt NodeIt;
@@ -79,9 +81,9 @@
   }
 
   Node n,m;
-  n=G.addNode();
+  n=m=INVALID;
   Edge e;
-  e=G.addEdge(n,m);
+  e=INVALID;
   n=G.tail(e);
   n=G.head(e);
 
@@ -91,7 +93,7 @@
   { int i=G.id(n); i=i; }
   { int i=G.id(e); i=i; }
   
-  G.clear();
+  //  G.clear();
 
   //NodeMap tests
   {
@@ -160,6 +162,25 @@
   
 }
 
+template<class Graph> void checkCompile(Graph &G) 
+{
+  checkCompileStaticGraph(G);
+
+  typedef typename Graph::Node Node;
+  typedef typename Graph::NodeIt NodeIt;
+  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();
+  
+  G.addEdge(n,m);
+}
+
+
 template<class Graph> void checkNodeList(Graph &G, int nn)
 {
   typename Graph::NodeIt n(G);
@@ -244,6 +265,7 @@
 template void checkCompile<SymSmartGraph>(SymSmartGraph &);
 template void checkCompile<ListGraph>(ListGraph &);
 template void checkCompile<SymListGraph>(SymListGraph &);
+template void checkCompileStaticGraph<FullGraph>(FullGraph &);
 
 //Due to some mysterious problems it does not work.
 template void checkCompile<EdgeSet <ListGraph> >(EdgeSet <ListGraph> &);



More information about the Lemon-commits mailing list