Skip to content

Commit a462a0b

Browse files
authored
Merge pull request #265 from JuliaRobotics/bug/214_subgrapharoundnode
Test for subgraph continuity
2 parents ebf4049 + 22fb00a commit a462a0b

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
@@ -416,6 +416,10 @@ end
416416
# Filter - always returns the node you start at but filters around that.
417417
dfgSubgraph = getSubgraphAroundNode(dfg, getFactor(dfg, :x7x8f1), 1, true, solvable=1)
418418
@test symdiff([:x7x8f1, :x7], [ls(dfgSubgraph)..., lsf(dfgSubgraph)...]) == []
419+
# Test for distance = 2, so that it only returns chains with solvable=1 (not orphans)
420+
#:x7x8f1 is not solvable
421+
dfgSubgraph = getSubgraphAroundNode(dfg, getVariable(dfg, :x8), 2, true, solvable=1)
422+
@test symdiff([:x8], [ls(dfgSubgraph)..., lsf(dfgSubgraph)...]) == []
419423

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

0 commit comments

Comments
 (0)