Skip to content

Commit 3a2ec9d

Browse files
committed
put back few more test
1 parent 05d16ac commit 3a2ec9d

File tree

2 files changed

+40
-19
lines changed

2 files changed

+40
-19
lines changed

test/consolInterfaceDev.jl

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,41 @@ end
158158
end
159159
#
160160
# #TODO Summaries and Summary Graphs
161-
# @testset "Summaries and Summary Graphs" begin
162-
# Summaries(testDFGAPI)
163-
# end
164-
#
165-
# @testset "Producing Dot Files" begin
166-
# ProducingDotFiles(testDFGAPI)
167-
# end
161+
@testset "Summaries and Summary Graphs" begin
162+
Summaries(testDFGAPI)
163+
end
164+
165+
@testset "Producing Dot Files" begin
166+
ProducingDotFiles(testDFGAPI, var1, var2, fac1)
167+
end
168168
#
169-
# @testset "Connectivity Test" begin
170-
# ConnectivityTest(testDFGAPI)
171-
# end
169+
@testset "Connectivity Test" begin
170+
fg = testDFGAPI()
171+
clearUser!!(fg)
172+
ConnectivityTest(testDFGAPI)
173+
end
172174

175+
@testset "Copy Functions" begin
176+
fg = testDFGAPI()
177+
clearUser!!(fg)
178+
fg = testDFGAPI()
179+
addVariable!(fg, var1)
180+
addVariable!(fg, var2)
181+
addVariable!(fg, var3)
182+
addFactor!(fg, fac1)
183+
184+
fgcopy = testDFGAPI()
185+
DFG._copyIntoGraph!(fg, fgcopy, union(ls(fg), lsf(fg)))
186+
@test getVariableOrder(fg,:abf1) == getVariableOrder(fgcopy,:abf1)
187+
188+
#test copyGraph, deepcopyGraph[!]
189+
fgcopy = testDFGAPI()
190+
DFG.deepcopyGraph!(fgcopy, fg)
191+
@test getVariableOrder(fg,:abf1) == getVariableOrder(fgcopy,:abf1)
173192

193+
CopyFunctionsTest(testDFGAPI)
194+
195+
end
174196
#
175197
#=
176198
fg = fg1

test/testBlocks.jl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,22 +1165,21 @@ function Summaries(testDFGAPI)
11651165
end
11661166
end
11671167

1168-
function ProducingDotFiles(testDFGAPI; VARTYPE=DFGVariable, FACTYPE=DFGFactor)
1168+
function ProducingDotFiles(testDFGAPI,
1169+
v1 = VARTYPE(:a, VariableNodeData{TestSofttype1}()),
1170+
v2 = VARTYPE(:b, VariableNodeData{TestSofttype1}()),
1171+
f1 = (FACTYPE==DFGFactor) ? DFGFactor{Int, :Symbol}(:abf1) : FACTYPE(:abf1);
1172+
VARTYPE=DFGVariable,
1173+
FACTYPE=DFGFactor)
11691174
# "Producing Dot Files"
11701175
# create a simpler graph for dot testing
11711176
dotdfg = testDFGAPI()
1172-
v1 = VARTYPE(:a, VariableNodeData{TestSofttype1}())
1173-
v2 = VARTYPE(:b, VariableNodeData{TestSofttype1}())
1174-
if FACTYPE==DFGFactor
1175-
f1 = DFGFactor{Int, :Symbol}(:abf1)
1176-
else
1177-
f1 = FACTYPE(:abf1)
1178-
end
1177+
11791178
addVariable!(dotdfg, v1)
11801179
addVariable!(dotdfg, v2)
11811180
addFactor!(dotdfg, [v1, v2], f1)
11821181
#NOTE hardcoded toDot will have different results so test LightGraphs seperately
1183-
if testDFGAPI <: LightDFG
1182+
if testDFGAPI <: LightDFG || testDFGAPI <: CloudGraphsDFG
11841183
@test toDot(dotdfg) == "graph G {\na [color=red, shape=ellipse];\nb [color=red, shape=ellipse];\nabf1 [color=blue, shape=box];\na -- abf1\nb -- abf1\n}\n"
11851184
else
11861185
@test toDot(dotdfg) == "graph graphname {\n2 [\"label\"=\"b\",\"shape\"=\"ellipse\",\"fillcolor\"=\"red\",\"color\"=\"red\"]\n2 -- 3\n3 [\"label\"=\"abf1\",\"shape\"=\"box\",\"fillcolor\"=\"blue\",\"color\"=\"blue\"]\n1 [\"label\"=\"a\",\"shape\"=\"ellipse\",\"fillcolor\"=\"red\",\"color\"=\"red\"]\n1 -- 3\n}\n"

0 commit comments

Comments
 (0)