Skip to content

Commit 22fb00a

Browse files
committed
Test for subgraph continuity
1 parent 15673f7 commit 22fb00a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/interfaceTests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@ end
358358
# Filter - always returns the node you start at but filters around that.
359359
dfgSubgraph = getSubgraphAroundNode(dfg, getFactor(dfg, :x7x8f1), 1, true, solvable=1)
360360
@test symdiff([:x7x8f1, :x7], [ls(dfgSubgraph)..., lsf(dfgSubgraph)...]) == []
361+
# Test for distance = 2, so that it only returns chains with solvable=1 (not orphans)
362+
#:x7x8f1 is not solvable
363+
dfgSubgraph = getSubgraphAroundNode(dfg, getVariable(dfg, :x8), 2, true, solvable=1)
364+
@test symdiff([:x8], [ls(dfgSubgraph)..., lsf(dfgSubgraph)...]) == []
361365

362366
# DFG issue #95 - confirming that getSubgraphAroundNode retains order
363367
# REF: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/95

0 commit comments

Comments
 (0)