commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1138242 - /commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
Date Tue, 21 Jun 2011 23:07:01 GMT
Author: simonetripodi
Date: Tue Jun 21 23:07:01 2011
New Revision: 1138242

URL: http://svn.apache.org/viewvc?rev=1138242&view=rev
Log:
properly renamed the graph variable name

Modified:
    commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java?rev=1138242&r1=1138241&r2=1138242&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
Tue Jun 21 23:07:01 2011
@@ -39,7 +39,7 @@ public final class DijkstraTestCase
     @Test
     public void findShortestPathAndVerify()
     {
-        DirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge> mutable
=
+        DirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge> graph
=
             new DirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge>();
 
         // building Graph
@@ -51,25 +51,25 @@ public final class DijkstraTestCase
         BaseLabeledVertex five = new BaseLabeledVertex( "5" );
         BaseLabeledVertex six = new BaseLabeledVertex( "6" );
 
-        mutable.addVertex( one );
-        mutable.addVertex( two );
-        mutable.addVertex( three );
-        mutable.addVertex( four );
-        mutable.addVertex( five );
-        mutable.addVertex( six );
-
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", one, six, 14D ) );
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", one, three, 9D ) );
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", one, two, 7D ) );
+        graph.addVertex( one );
+        graph.addVertex( two );
+        graph.addVertex( three );
+        graph.addVertex( four );
+        graph.addVertex( five );
+        graph.addVertex( six );
+
+        graph.addEdge( new BaseLabeledWeightedEdge( "", one, six, 14D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", one, three, 9D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", one, two, 7D ) );
 
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", two, three, 10D ) );
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", two, four, 15D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", two, three, 10D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", two, four, 15D ) );
 
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", three, six, 2D ) );
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", three, four, 11D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", three, six, 2D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", three, four, 11D ) );
 
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", four, five, 6D ) );
-        mutable.addEdge( new BaseLabeledWeightedEdge( "", six, five, 9D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", four, five, 6D ) );
+        graph.addEdge( new BaseLabeledWeightedEdge( "", six, five, 9D ) );
 
         // expected path
 
@@ -86,7 +86,7 @@ public final class DijkstraTestCase
 
         // actual path
 
-        Path<BaseLabeledVertex, BaseLabeledWeightedEdge> actual = findShortestPath(
mutable, one, five );
+        Path<BaseLabeledVertex, BaseLabeledWeightedEdge> actual = findShortestPath(
graph, one, five );
 
         // assert!
 



Mime
View raw message