@@ -4,7 +4,7 @@ using Dates
4
4
using Manifolds
5
5
6
6
import Base: convert
7
- import DistributedFactorGraphs: reconstFactorData
7
+ import DistributedFactorGraphs: reconstFactorData, getData, addData!, updateData!, deleteData!
8
8
9
9
# Test InferenceVariable Types
10
10
# struct TestVariableType1 <: InferenceVariable
@@ -987,6 +987,7 @@ function blobsStoresTestBlock!(fg)
987
987
988
988
# add
989
989
var1 = getVariable (fg, :a )
990
+ var2 = getVariable (fg, :b )
990
991
@test addBlobEntry! (var1, de1) == de1
991
992
updateVariable! (fg, var1)
992
993
@test addBlobEntry! (fg, :a , de2) == de2
@@ -996,7 +997,7 @@ function blobsStoresTestBlock!(fg)
996
997
# get
997
998
@test deepcopy (de1) == getBlobEntry (var1, :label1 )
998
999
@test deepcopy (de2) == getBlobEntry (fg, :a , :label2 )
999
- @test_throws ErrorException getBlobEntry (v2 , :label1 )
1000
+ @test_throws ErrorException getBlobEntry (var2 , :label1 )
1000
1001
@test_throws ErrorException getBlobEntry (fg, :b , :label1 )
1001
1002
1002
1003
# update
@@ -1043,19 +1044,19 @@ function blobsStoresTestBlock!(fg)
1043
1044
# Data functions
1044
1045
testData = rand (UInt8, 50 )
1045
1046
# Adding
1046
- newData = addBlob ! (fg, fs. key, :a , :testing , testData)
1047
+ newData = addData ! (fg, fs. key, :a , :testing , testData) # convenience wrapper over addBlob!
1047
1048
# Listing
1048
1049
@test :testing in listBlobEntries (fg, :a )
1049
1050
# Getting
1050
- data = getBlob (fg, fs, :a , :testing )
1051
+ data = getData (fg, fs, :a , :testing ) # convenience wrapper over getBlob
1051
1052
@test data[1 ]. hash == newData[1 ]. hash
1052
1053
@test data[2 ] == newData[2 ]
1053
1054
# Updating
1054
- updateData = updateBlob ! (fg, fs, :a , newData[1 ], rand (UInt8, 50 ))
1055
+ updateData = updateData ! (fg, fs, :a , newData[1 ], rand (UInt8, 50 )) # convenience wrapper around updateBlob!
1055
1056
@test updateData[1 ]. hash != data[1 ]. hash
1056
1057
@test updateData[2 ] != data[2 ]
1057
1058
# Deleting
1058
- retData = deleteBlob ! (fg, :a , :testing )
1059
+ retData = deleteData ! (fg, :a , :testing ) # convenience wrapper around deleteBlob!
1059
1060
1060
1061
end
1061
1062
0 commit comments