@@ -349,6 +349,10 @@ function DFGFactorSCA()
349349 TestFunctorInferenceType1 ();
350350 timestamp = ZonedDateTime (" 2020-08-11T00:12:03.000-05:00" ),
351351 )
352+
353+ # test IIF like constructor
354+ f3 = FactorDFG ([:a , :b ], TestFunctorInferenceType1 ())
355+
352356 # TODO add tests for mutating vos in updateFactor and orphan related checks.
353357 # we should perhaps prevent an empty vos
354358
@@ -558,31 +562,30 @@ function tagsTestBlock!(fg, v1, v1_tags)
558562
559563 @test listNeighbors (fg, :abf1 ; tagsFilter = ⊇ ([:LANDMARK ])) == [:b ]
560564 @test isempty (listNeighbors (fg, :abf1 ; tagsFilter = ⊇ ([:LANDMARK , :TAG ])))
561-
565+
562566 # Test specific type tag accessors
563567 @test issetequal (listVariableTags (fg, :a ), listTags (fg, :a ))
564568 @test issetequal (listFactorTags (fg, :abf1 ), listTags (fg, :abf1 ))
565-
569+
566570 # Test mergeVariableTags! and mergeFactorTags!
567571 initialVarTags = listVariableTags (fg, :a )
568572 @test mergeVariableTags! (fg, :a , [:NEW_VAR_TAG ]) == 1
569573 @test :NEW_VAR_TAG ∈ listVariableTags (fg, :a )
570-
574+
571575 initialFactorTags = listFactorTags (fg, :abf1 )
572576 @test mergeFactorTags! (fg, :abf1 , [:NEW_FACTOR_TAG ]) == 1
573577 @test :NEW_FACTOR_TAG ∈ listFactorTags (fg, :abf1 )
574578
575579 # @test listGraphTags(fg) isa Vector{Symbol}
576580 # @test listAgentTags(fg) isa Vector{Symbol}
577-
581+
578582 initialGraphTags = length (listGraphTags (fg))
579583 @test mergeGraphTags! (fg, [:GRAPH_TAG ]) == 1
580584 @test :GRAPH_TAG ∈ listGraphTags (fg)
581-
585+
582586 initialAgentTags = length (listAgentTags (fg))
583587 @test mergeAgentTags! (fg, [:AGENT_TAG ]) == 1
584588 @test :AGENT_TAG ∈ listAgentTags (fg)
585-
586589end
587590
588591function VSDTestBlock! (fg, v1)
@@ -678,9 +681,12 @@ function blobletTestBlock!(fg)
678681 @test addVariableBloblet! (fg, :a , Bloblet (:c , true )) == Bloblet (:c , true )
679682 @test addVariableBloblet! (fg, :a , Bloblet (:d , " yes" )) == Bloblet (:d , " yes" )
680683 @test addVariableBloblet! (fg, :a , Bloblet (:e , [1 , 2 , 3 ])) == Bloblet (:e , [1 , 2 , 3 ])
681- @test addVariableBloblet! (fg, :a , Bloblet (:f , [1.4 , 2.5 , 3.6 ])) == Bloblet (:f , [1.4 , 2.5 , 3.6 ])
682- @test addVariableBloblet! (fg, :a , Bloblet (:g , [" yes" , " maybe" ])) == Bloblet (:g , [" yes" , " maybe" ])
683- @test addVariableBloblet! (fg, :a , Bloblet (:h , [true , false ])) == Bloblet (:h , [true , false ])
684+ @test addVariableBloblet! (fg, :a , Bloblet (:f , [1.4 , 2.5 , 3.6 ])) ==
685+ Bloblet (:f , [1.4 , 2.5 , 3.6 ])
686+ @test addVariableBloblet! (fg, :a , Bloblet (:g , [" yes" , " maybe" ])) ==
687+ Bloblet (:g , [" yes" , " maybe" ])
688+ @test addVariableBloblet! (fg, :a , Bloblet (:h , [true , false ])) ==
689+ Bloblet (:h , [true , false ])
684690
685691 @test_throws LabelExistsError addVariableBloblet! (fg, :a , Bloblet (:a , 3 ))
686692 @test mergeVariableBloblet! (fg, :a , Bloblet (:a , 3 )) == 1
0 commit comments