Skip to content

Commit 6596bbe

Browse files
committed
Fixed Dijkstra test typo
1 parent 724ef3c commit 6596bbe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/com/jwetherell/algorithms/graph/test/Graphs.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ private Graph.CostPathPair<Integer> getIdealDirectedWithNegWeightsPathPair(Direc
361361
}
362362

363363
@Test
364-
public void testDijstraUndirected() {
364+
public void testDijkstraUndirected() {
365365
final UndirectedGraph undirected = new UndirectedGraph();
366366
final Graph.Vertex<Integer> start = undirected.v1;
367367
final Graph.Vertex<Integer> end = undirected.v5;
@@ -546,14 +546,14 @@ public void testDijkstraDirected() {
546546
for (Graph.Vertex<Integer> v : map1.keySet()) {
547547
final Graph.CostPathPair<Integer> path1 = map1.get(v);
548548
final Graph.CostPathPair<Integer> path2 = getIdealDirectedPath(directed).get(v);
549-
assertTrue("Dijstra's shortest path error. path1="+path1+" path2="+path2, path1.equals(path2));
549+
assertTrue("Dijkstra's shortest path error. path1="+path1+" path2="+path2, path1.equals(path2));
550550
}
551551

552552
final Graph.CostPathPair<Integer> pair1 = Dijkstra.getShortestPath(directed.graph, start, end);
553553
assertTrue("No path from "+start.getValue()+" to "+end.getValue(), (pair1!=null));
554554

555555
// Compare pair
556-
assertTrue("Dijstra's shortest path error. pair1="+pair1+" idealPathPair="+getIdealPathPair(directed), pair1.equals(getIdealPathPair(directed)));
556+
assertTrue("Dijkstra's shortest path error. pair1="+pair1+" idealPathPair="+getIdealPathPair(directed), pair1.equals(getIdealPathPair(directed)));
557557
}
558558

559559
@Test
@@ -579,7 +579,7 @@ public void testBellmanFordDirected() {
579579
}
580580

581581
@Test
582-
public void testDijstraDirectedWihtNegativeWeights() {
582+
public void testDijkstraDirectedWihtNegativeWeights() {
583583
final DirectedWithNegativeWeights directedWithNegWeights = new DirectedWithNegativeWeights();
584584
{ // DIRECTED GRAPH (WITH NEGATIVE WEIGHTS)
585585
final Graph.Vertex<Integer> start = directedWithNegWeights.v1;

0 commit comments

Comments
 (0)