Skip to content

Commit

Permalink
fix sssp test bug (#113)
Browse files Browse the repository at this point in the history
Change-Id: Ib8fce033726823184dd4900756a3f8ce2537bb6b
  • Loading branch information
zhoney authored Dec 14, 2020
1 parent 783e687 commit d38fd7c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ public void testSingleSourceShortestPathWithDegree() {
public void testSingleSourceShortestPathWithLimit() {
WeightedPaths weightedPaths = singleSourceShortestPathAPI.get(
"A", Direction.BOTH, null, "weight",
-1, 0, -1, 10, false);
Assert.assertEquals(10, weightedPaths.paths().size());
-1, 0, -1, 11, false);
Assert.assertEquals(11, weightedPaths.paths().size());

WeightedPath.Path path = weightedPaths.paths().get("B");
Assert.assertEquals(0.2D, path.weight(), Double.MIN_VALUE);
Expand All @@ -462,6 +462,11 @@ public void testSingleSourceShortestPathWithLimit() {
Assert.assertEquals(0.8D, path.weight(), Double.MIN_VALUE);
Assert.assertEquals(ImmutableList.of("A", "E", "F"), path.vertices());

path = weightedPaths.paths().get("L");
Assert.assertEquals(0.8D, path.weight(), Double.MIN_VALUE);
Assert.assertEquals(ImmutableList.of("A", "H", "I", "J", "Z", "L"),
path.vertices());

path = weightedPaths.paths().get("G");
Assert.assertEquals(0.6D, path.weight(), Double.MIN_VALUE);
Assert.assertEquals(ImmutableList.of("A", "H", "I", "J", "Z", "G"),
Expand Down

0 comments on commit d38fd7c

Please sign in to comment.