# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1228002680 -3600
# Node ID e7707b3069f11db5a15f4a7f5c8adc7b24d810cf
# Parent  37054b67d8076ef99d6f88052a040cf3fff7bda2
Better test files for Preflow (#176)

 - Slightly improve preflow_test.cc.
 - Change preflow_test.lgf to meet the new LGF format
   and remove trailing tabs.

diff -r 37054b67d807 -r e7707b3069f1 test/preflow_graph.lgf
--- a/test/preflow_graph.lgf	Sun Nov 30 00:50:31 2008 +0100
+++ b/test/preflow_graph.lgf	Sun Nov 30 00:51:20 2008 +0100
@@ -1,35 +1,34 @@
 @nodes
-label	
-0	
-1	
-2	
-3	
-4	
-5	
-6	
-7	
-8	
-9	
-@edges
-		label	capacity	
-0	1	0	20	
-0	2	1	0	
-1	1	2	3	
-1	2	3	8	
-1	3	4	8	
-2	5	5	5	
-3	2	6	5	
-3	5	7	5	
-3	6	8	5	
-4	3	9	3	
-5	7	10	3	
-5	6	11	10	
-5	8	12	10	
-6	8	13	8	
-8	9	14	20	
-8	1	15	5	
-9	5	16	5	
-@attributes 
+label
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+@arcs
+		label	capacity
+0	1	0	20
+0	2	1	0
+1	1	2	3
+1	2	3	8
+1	3	4	8
+2	5	5	5
+3	2	6	5
+3	5	7	5
+3	6	8	5
+4	3	9	3
+5	7	10	3
+5	6	11	10
+5	8	12	10
+6	8	13	8
+8	9	14	20
+8	1	15	5
+9	5	16	5
+@attributes
 source 1
 target 8
-@end
diff -r 37054b67d807 -r e7707b3069f1 test/preflow_test.cc
--- a/test/preflow_test.cc	Sun Nov 30 00:50:31 2008 +0100
+++ b/test/preflow_test.cc	Sun Nov 30 00:51:20 2008 +0100
@@ -25,10 +25,11 @@
 #include <lemon/concepts/digraph.h>
 #include <lemon/concepts/maps.h>
 #include <lemon/lgf_reader.h>
+#include <lemon/elevator.h>
 
 using namespace lemon;
 
-void checkPreflow()
+void checkPreflowCompile()
 {
   typedef int VType;
   typedef concepts::Digraph Digraph;
@@ -39,6 +40,9 @@
   typedef concepts::ReadWriteMap<Arc,VType> FlowMap;
   typedef concepts::WriteMap<Node,bool> CutMap;
 
+  typedef Elevator<Digraph, Digraph::Node> Elev;
+  typedef LinkedElevator<Digraph, Digraph::Node> LinkedElev;
+
   Digraph g;
   Node n;
   Arc e;
@@ -46,7 +50,11 @@
   FlowMap flow;
   CutMap cut;
 
-  Preflow<Digraph, CapMap>::SetFlowMap<FlowMap>::Create preflow_test(g,cap,n,n);
+  Preflow<Digraph, CapMap>
+    ::SetFlowMap<FlowMap>
+    ::SetElevator<Elev>
+    ::SetStandardElevator<LinkedElev>
+    ::Create preflow_test(g,cap,n,n);
 
   preflow_test.capacityMap(cap);
   flow = preflow_test.flowMap();