Skip to content

Commit e0b0f99

Browse files
committed
Fixing deprecations in runtests.jl
1 parent ff01cc0 commit e0b0f99

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

test/interfaceTests.jl

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
dfg = testDFGAPI{NoSolverParams}()
2-
v1 = DFGVariable(:a)
3-
v2 = DFGVariable(:b)
2+
3+
#add types for softtypes
4+
struct TestInferenceVariable1 <: InferenceVariable end
5+
struct TestInferenceVariable2 <: InferenceVariable end
6+
7+
v1 = DFGVariable(:a, TestInferenceVariable1())
8+
v2 = DFGVariable(:b, TestInferenceVariable2())
49
f1 = DFGFactor{Int, :Symbol}(:f1)
510

611
#add tags for filters
712
append!(v1.tags, [:VARIABLE, :POSE])
813
append!(v2.tags, [:VARIABLE, :LANDMARK])
914
append!(f1.tags, [:FACTOR])
1015

11-
#add types for softtypes
12-
struct TestInferenceVariable1 <: InferenceVariable end
13-
struct TestInferenceVariable2 <: InferenceVariable end
14-
1516
st1 = TestInferenceVariable1()
1617
st2 = TestInferenceVariable2()
1718

@@ -39,9 +40,9 @@ addFactor!(dfg, [v1, v2], f1)
3940

4041
@testset "Adding Removing Nodes" begin
4142
dfg2 = testDFGAPI{NoSolverParams}()
42-
v1 = DFGVariable(:a)
43-
v2 = DFGVariable(:b)
44-
v3 = DFGVariable(:c)
43+
v1 = DFGVariable(:a, TestInferenceVariable1())
44+
v2 = DFGVariable(:b, TestInferenceVariable1())
45+
v3 = DFGVariable(:c, TestInferenceVariable1())
4546
f1 = DFGFactor{Int, :Symbol}(:f1)
4647
f2 = DFGFactor{Int, :Symbol}(:f2)
4748
# @testset "Creating Graphs" begin
@@ -277,14 +278,15 @@ end
277278
# Now make a complex graph for connectivity tests
278279
numNodes = 10
279280
dfg = testDFGAPI{NoSolverParams}()
280-
verts = map(n -> DFGVariable(Symbol("x$n")), 1:numNodes)
281+
verts = map(n -> DFGVariable(Symbol("x$n"), TestInferenceVariable1()), 1:numNodes)
281282
#change ready and backendset for x7,x8 for improved tests on x7x8f1
282283
verts[7].ready = 1
283284
verts[8].backendset = 1
284285

285-
#force softytypes to first 2 vertices.
286-
verts[1].solverDataDict[:default].softtype = deepcopy(st1)
287-
verts[2].solverDataDict[:default].softtype = deepcopy(st2)
286+
# Can't change the softtypes now.
287+
# #force softytypes to first 2 vertices.
288+
# verts[1].solverDataDict[:default].softtype = deepcopy(st1)
289+
# verts[2].solverDataDict[:default].softtype = deepcopy(st2)
288290

289291
map(v -> addVariable!(dfg, v), verts)
290292
map(n -> addFactor!(dfg, [verts[n], verts[n+1]], DFGFactor{Int, :Symbol}(Symbol("x$(n)x$(n+1)f1"))), 1:(numNodes-1))
@@ -376,8 +378,8 @@ end
376378
@testset "Producing Dot Files" begin
377379
# create a simpler graph for dot testing
378380
dotdfg = testDFGAPI{NoSolverParams}()
379-
v1 = DFGVariable(:a)
380-
v2 = DFGVariable(:b)
381+
v1 = DFGVariable(:a, TestInferenceVariable1())
382+
v2 = DFGVariable(:b, TestInferenceVariable1())
381383
f1 = DFGFactor{Int, :Symbol}(:f1)
382384
addVariable!(dotdfg, v1)
383385
addVariable!(dotdfg, v2)

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ using Pkg
1010
# Run: docker run -d --publish=7474:7474 --publish=7687:7687 --env NEO4J_AUTH=neo4j/test neo4j
1111
##
1212

13+
# If you want to enable debugging logging (very verbose!)
14+
# logger = SimpleLogger(stdout, Logging.Debug)
15+
# global_logger(logger)
16+
1317
# Test each interface
1418
# Still test LightDFG and MetaGraphsDFG for the moment until we remove in 0.4.2
1519
apis = [

0 commit comments

Comments
 (0)