Skip to content

Commit 9ae9dab

Browse files
committed
Fixing tests
1 parent bc0e0a0 commit 9ae9dab

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

test/interfaceTests.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
dfg = testDFGAPI{NoSolverParams}()
21
v1 = DFGVariable(:a)
32
v2 = DFGVariable(:b)
43
f1 = DFGFactor{Int, :Symbol}(:f1)
@@ -17,7 +16,7 @@ addFactor!(dfg, [v1, v2], f1)
1716
# end
1817

1918
@testset "Adding Removing Nodes" begin
20-
dfg2 = testDFGAPI{NoSolverParams}()
19+
dfg2 = DistributedFactorGraphs._getDuplicatedEmptyDFG(dfg)
2120
v1 = DFGVariable(:a)
2221
v2 = DFGVariable(:b)
2322
v3 = DFGVariable(:c)
@@ -203,7 +202,7 @@ end
203202

204203
# Now make a complex graph for connectivity tests
205204
numNodes = 10
206-
dfg = testDFGAPI{NoSolverParams}()
205+
dfg = DistributedFactorGraphs._getDuplicatedEmptyDFG(dfg)
207206
verts = map(n -> DFGVariable(Symbol("x$n")), 1:numNodes)
208207
#change ready and backendset for x7,x8 for improved tests on x7x8f1
209208
verts[7].ready = 1
@@ -293,7 +292,7 @@ end
293292

294293
@testset "Producing Dot Files" begin
295294
# create a simpler graph for dot testing
296-
dotdfg = testDFGAPI{NoSolverParams}()
295+
dotdfg = DistributedFactorGraphs._getDuplicatedEmptyDFG(dfg)
297296
v1 = DFGVariable(:a)
298297
v2 = DFGVariable(:b)
299298
f1 = DFGFactor{Int, :Symbol}(:f1)

test/runtests.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using IncrementalInference
77
# Instantiate the APIs that you would like to test here
88
# Can do duplicates with different parameters.
99
apis = [
10-
# GraphsDFG{NoSolverParams}(),
10+
GraphsDFG{NoSolverParams}(),
1111
LightDFG{NoSolverParams}(),
1212
# MetaGraphsDFG{NoSolverParams}(),
1313
# SymbolDFG{NoSolverParams}(),
@@ -22,11 +22,17 @@ apis = [
2222
for api in apis
2323
@testset "Testing Driver: $(typeof(api))" begin
2424
@info "Testing Driver: $(api)"
25-
global dfg = api
25+
global dfg = deepcopy(api)
26+
include("interfaceTests.jl")
27+
end
28+
end
29+
for api in apis
30+
@testset "Testing Driver: $(typeof(api))" begin
31+
@info "Testing Driver: $(api)"
32+
global dfg = deepcopy(api)
2633
include("iifInterfaceTests.jl")
2734
end
2835
end
29-
3036
# Test each interface
3137
# apis = [GraphsDFG, MetaGraphsDFG, SymbolDFG, LightDFG]
3238
# for api in apis

0 commit comments

Comments
 (0)