@@ -45,34 +45,36 @@ global dfg,v1,v2,f1
45
45
@test lsf (dfg2) == [:v1v2f1 ]
46
46
end
47
47
48
- # @testset "Listing Nodes" begin
49
- # global dfg,v1,v2,f1
50
- # @test length(ls(dfg)) == 2
51
- # @test length(lsf(dfg)) == 1
52
- # @test symdiff([:a, :b], getVariableIds(dfg)) == []
53
- # @test getFactorIds(dfg) == [:abf1]
54
- # #
55
- # @test lsf(dfg, :a) == [f1.label]
56
- # # Tags
57
- # @test ls(dfg, tags=[:POSE]) == [:a]
58
- # @test symdiff(ls(dfg, tags=[:POSE, :LANDMARK]), ls(dfg, tags=[:VARIABLE])) == []
59
- # # Regexes
60
- # @test ls(dfg, r"a") == [v1.label]
61
- # @test lsf(dfg, r"f*") == [f1.label]
62
- # # Accessors
63
- # @test getAddHistory(dfg) == [:a, :b] #, :abf1
64
- # @test getDescription(dfg) != nothing
65
- # @test getLabelDict(dfg) != nothing
66
- # # Existence
67
- # @test exists(dfg, :a) == true
68
- # @test exists(dfg, v1) == true
69
- # @test exists(dfg, :nope) == false
70
- # # Sorting of results
71
- # # TODO - this function needs to be cleaned up
72
- # unsorted = [:x1_3;:x1_6;:l1;:april1] #this will not work for :x1x2f1
73
- # @test sortDFG(unsorted) == sortVarNested(unsorted)
74
- # @test_skip sortDFG([:x1x2f1, :x1l1f1]) == [:x1l1f1, :x1x2f1]
75
- # end
48
+ @testset " Listing Nodes" begin
49
+ global dfg,v1,v2,f1
50
+ @test length (ls (dfg)) == 2
51
+ @test length (lsf (dfg)) == 1 # Unless we add the prior!
52
+ @test symdiff ([:v1 , :v2 ], getVariableIds (dfg)) == []
53
+ @test getFactorIds (dfg) == [:v1v2f1 ] # Unless we add the prior!
54
+ #
55
+ @test lsf (dfg, :v1 ) == [f1. label]
56
+ # Tags
57
+ @test ls (dfg, tags= [:POSE ]) == [:v1 ]
58
+ @test symdiff (ls (dfg, tags= [:POSE , :LANDMARK ]), ls (dfg, tags= [:VARIABLE ])) == []
59
+ # Regexes
60
+ @test ls (dfg, r" v1" ) == [v1. label]
61
+ # TODO : Check that this regular expression works on everything else!
62
+ # REF: https://stackoverflow.com/questions/23834692/using-regular-expression-in-neo4j
63
+ @test lsf (dfg, r" v1v2.*" ) == [f1. label]
64
+ # Accessors
65
+ @test getAddHistory (dfg) == [:v1 , :v2 ] # , :abf1
66
+ @test getDescription (dfg) != nothing
67
+ @test getLabelDict (dfg) != nothing
68
+ # Existence
69
+ @test exists (dfg, :v1 ) == true
70
+ @test exists (dfg, v1) == true
71
+ @test exists (dfg, :nope ) == false
72
+ # Sorting of results
73
+ # TODO - this function needs to be cleaned up
74
+ unsorted = [:x1_3 ;:x1_6 ;:l1 ;:april1 ] # this will not work for :x1x2f1
75
+ @test sortDFG (unsorted) == sortVarNested (unsorted)
76
+ @test_skip sortDFG ([:x1x2f1 , :x1l1f1 ]) == [:x1l1f1 , :x1x2f1 ]
77
+ end
76
78
#
77
79
# # Gets
78
80
# @testset "Gets, Sets, and Accessors" begin
0 commit comments