Skip to content

Commit 24d5122

Browse files
committed
fixed softtype tests
1 parent 6bb0fc6 commit 24d5122

File tree

2 files changed

+33
-29
lines changed

2 files changed

+33
-29
lines changed

test/interfaceTests.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ append!(v2.tags, [:VARIABLE, :LANDMARK])
99
append!(f1.tags, [:FACTOR])
1010

1111
#add types for softtypes
12-
st1 = "Type1"
13-
st2 = "Type2"
12+
struct TestInferenceVariable1 <: InferenceVariable end
13+
struct TestInferenceVariable2 <: InferenceVariable end
14+
15+
st1 = TestInferenceVariable1()
16+
st2 = TestInferenceVariable2()
17+
1418
v1.solverDataDict[:default].softtype = deepcopy(st1)
1519
v2.solverDataDict[:default].softtype = deepcopy(st2)
1620

test/runtests.jl

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@ using Test
22
using GraphPlot # For plotting tests
33
using Neo4j
44
using DistributedFactorGraphs
5-
using IncrementalInference
5+
# using IncrementalInference
66

77
# Instantiate the APIs that you would like to test here
88
# Can do duplicates with different parameters.
9-
apis = [
10-
GraphsDFG{NoSolverParams}(),
11-
LightDFG{NoSolverParams}(),
12-
MetaGraphsDFG{NoSolverParams}(),
13-
SymbolDFG{NoSolverParams}(),
14-
CloudGraphsDFG{SolverParams}("localhost", 7474, "neo4j", "test",
15-
"testUser", "testRobot", "testSession",
16-
nothing,
17-
nothing,
18-
IncrementalInference.decodePackedType,
19-
IncrementalInference.rebuildFactorMetadata!,
20-
solverParams=SolverParams())
21-
]
22-
for api in apis
23-
@testset "Testing Driver: $(typeof(api))" begin
24-
@info "Testing Driver: $(api)"
25-
global dfg = api
26-
include("iifInterfaceTests.jl")
27-
end
28-
end
29-
30-
# Test each interface
31-
# apis = [GraphsDFG, MetaGraphsDFG, SymbolDFG, LightDFG]
9+
# apis = [
10+
# GraphsDFG{NoSolverParams}(),
11+
# LightDFG{NoSolverParams}(),
12+
# MetaGraphsDFG{NoSolverParams}(),
13+
# SymbolDFG{NoSolverParams}(),
14+
# CloudGraphsDFG{SolverParams}("localhost", 7474, "neo4j", "test",
15+
# "testUser", "testRobot", "testSession",
16+
# nothing,
17+
# nothing,
18+
# IncrementalInference.decodePackedType,
19+
# IncrementalInference.rebuildFactorMetadata!,
20+
# solverParams=SolverParams())
21+
# ]
3222
# for api in apis
33-
# @testset "Testing Driver: $(api)" begin
23+
# @testset "Testing Driver: $(typeof(api))" begin
3424
# @info "Testing Driver: $(api)"
35-
# global testDFGAPI = api
36-
# include("interfaceTests.jl")
25+
# global dfg = api
26+
# include("iifInterfaceTests.jl")
3727
# end
3828
# end
3929

30+
# Test each interface
31+
apis = [GraphsDFG, MetaGraphsDFG, SymbolDFG, LightDFG]
32+
for api in apis
33+
@testset "Testing Driver: $(api)" begin
34+
@info "Testing Driver: $(api)"
35+
global testDFGAPI = api
36+
include("interfaceTests.jl")
37+
end
38+
end
39+
4040
# Test special cases
4141

4242
@testset "Plotting Tests" begin

0 commit comments

Comments
 (0)