Skip to content

Commit a555bbd

Browse files
authored
update tests for IIF#862 (#644)
1 parent c0d632b commit a555bbd

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

test/fileDFGTests.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ using Test
3939

4040
facts = map(n -> addFactor!(dfg, [verts[n], verts[n+1]], LinearConditional(Normal(50.0,2.0))), 1:(numNodes-1))
4141
map(f -> setSolvable!(f, Int(round(rand()))), facts)
42-
map(f -> f.solverData.multihypo = [1, 0.1, 0.9], facts)
4342
map(f -> f.solverData.eliminated = rand() > 0.5, facts)
4443
map(f -> f.solverData.potentialused = rand() > 0.5, facts)
4544
updateFactor!.(dfg, facts)
4645

46+
#test multihypo
47+
addFactor!(dfg, [:x1, :x2, :x3], LinearConditional(Normal(50.0,2.0)), multihypo = [1, 0.3, 0.7])
48+
4749
# Save and load the graph to test.
4850
saveDFG(filename, dfg)
4951

@@ -61,11 +63,10 @@ using Test
6163
for fact in lsf(dfg)
6264
@test compareFactor(getFactor(dfg, fact),
6365
getFactor(retDFG, fact),
64-
skip=[
65-
:hypotheses, :certainhypo, :multihypo, # Multihypo
66-
:eliminated,
67-
:timezone, :zone, # Timezones
68-
:potentialused])
66+
skip=[:timezone, :zone]) # Timezones
67+
# :hypotheses, :certainhypo, :multihypo, # Multihypo
68+
# :eliminated,
69+
# :potentialused])
6970
end
7071

7172
# Check data entries
@@ -94,4 +95,4 @@ end
9495
@test issetequal(ls(retDFG), [:x1, :x2, :x3, :x4, :x5])
9596
@test issetequal(lsf(retDFG), [:x3x4f1, :x4x5f1, :x1x2f1, :x2x3f1])
9697
end
97-
end
98+
end

test/interfaceTests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ testDFGAPI = LightDFG
1717
using Logging
1818
logger = SimpleLogger(stdout, Logging.Debug)
1919
global_logger(logger)
20+
21+
# or
22+
logger = ConsoleLogger(stdout, Logging.Debug)
23+
global_logger(logger)
24+
# or
25+
ENV["JULIA_DEBUG"] = :CloudGraphsDFGs #module name or file name
26+
2027
end
2128

2229
# DFG Accessors

0 commit comments

Comments
 (0)