@@ -169,65 +169,66 @@ end
169
169
170
170
# Session, robot, and user small data tests
171
171
# NOTE: CloudGraphDFG isnt supporting this yet.
172
- if ! (typeof (dfg) <: CloudGraphsDFG )
173
- smallUserData = Dict {Symbol, String} (:a => " 42" , :b => " Hello" )
174
- smallRobotData = Dict {Symbol, String} (:a => " 43" , :b => " Hello" )
175
- smallSessionData = Dict {Symbol, String} (:a => " 44" , :b => " Hello" )
176
- setUserData (dfg, deepcopy (smallUserData))
177
- setRobotData (dfg, deepcopy (smallRobotData))
178
- setSessionData (dfg, deepcopy (smallSessionData))
179
- @test getUserData (dfg) == smallUserData
180
- @test getRobotData (dfg) == smallRobotData
181
- @test getSessionData (dfg) == smallSessionData
182
- end
172
+ # NOTE: Only available in v0.5
173
+ # if !(typeof(dfg) <: CloudGraphsDFG)
174
+ # smallUserData = Dict{Symbol, String}(:a => "42", :b => "Hello")
175
+ # smallRobotData = Dict{Symbol, String}(:a => "43", :b => "Hello")
176
+ # smallSessionData = Dict{Symbol, String}(:a => "44", :b => "Hello")
177
+ # setUserData(dfg, deepcopy(smallUserData))
178
+ # setRobotData(dfg, deepcopy(smallRobotData))
179
+ # setSessionData(dfg, deepcopy(smallSessionData))
180
+ # @test getUserData(dfg) == smallUserData
181
+ # @test getRobotData(dfg) == smallRobotData
182
+ # @test getSessionData(dfg) == smallSessionData
183
+ # end
183
184
end
184
185
185
- @testset " BigData" begin
186
- # NOTE: CloudGraphDFG isnt supporting this yet.
187
- if ! (typeof (dfg) <: CloudGraphsDFG )
188
- oid = zeros (UInt8,12 ); oid[12 ] = 0x01
189
- de1 = MongodbBigDataEntry (:key1 , NTuple {12,UInt8} (oid))
190
-
191
- oid = zeros (UInt8,12 ); oid[12 ] = 0x02
192
- de2 = MongodbBigDataEntry (:key2 , NTuple {12,UInt8} (oid))
193
-
194
- oid = zeros (UInt8,12 ); oid[12 ] = 0x03
195
- de2_update = MongodbBigDataEntry (:key2 , NTuple {12,UInt8} (oid))
196
-
197
- # add
198
- v1 = getVariable (dfg, :a )
199
- @test addBigDataEntry! (v1, de1)
200
- @test addBigDataEntry! (dfg, :a , de2)
201
- @test addBigDataEntry! (v1, de1)
202
-
203
- # get
204
- @test deepcopy (de1) == getBigDataEntry (v1, :key1 )
205
- @test deepcopy (de2) == getBigDataEntry (dfg, :a , :key2 )
206
- @test_throws Any getBigDataEntry (v2, :key1 )
207
- @test_throws Any getBigDataEntry (dfg, :b , :key1 )
208
-
209
- # update
210
- @test updateBigDataEntry! (dfg, :a , de2_update)
211
- @test deepcopy (de2_update) == getBigDataEntry (dfg, :a , :key2 )
212
- @test ! updateBigDataEntry! (dfg, :b , de2_update)
213
-
214
- # list
215
- entries = getBigDataEntries (dfg, :a )
216
- @test length (entries) == 2
217
- @test symdiff (map (e-> e. key, entries), [:key1 , :key2 ]) == Symbol[]
218
- @test length (getBigDataEntries (dfg, :b )) == 0
219
-
220
- @test symdiff (getBigDataKeys (dfg, :a ), [:key1 , :key2 ]) == Symbol[]
221
- @test getBigDataKeys (dfg, :b ) == Symbol[]
222
-
223
- # delete
224
- @test deepcopy (de1) == deleteBigDataEntry! (v1, :key1 )
225
- @test getBigDataKeys (v1) == Symbol[:key2 ]
226
- # delete from dfg
227
- @test deepcopy (de2_update) == deleteBigDataEntry! (dfg, :a , :key2 )
228
- @test getBigDataKeys (v1) == Symbol[]
229
- end
230
- end
186
+ # @testset "BigData" begin
187
+ # # NOTE: CloudGraphDFG isnt supporting this yet.
188
+ # if !(typeof(dfg) <: CloudGraphsDFG)
189
+ # oid = zeros(UInt8,12); oid[12] = 0x01
190
+ # de1 = MongodbBigDataEntry(:key1, NTuple{12,UInt8}(oid))
191
+ #
192
+ # oid = zeros(UInt8,12); oid[12] = 0x02
193
+ # de2 = MongodbBigDataEntry(:key2, NTuple{12,UInt8}(oid))
194
+ #
195
+ # oid = zeros(UInt8,12); oid[12] = 0x03
196
+ # de2_update = MongodbBigDataEntry(:key2, NTuple{12,UInt8}(oid))
197
+ #
198
+ # #add
199
+ # v1 = getVariable(dfg, :a)
200
+ # @test addBigDataEntry!(v1, de1)
201
+ # @test addBigDataEntry!(dfg, :a, de2)
202
+ # @test addBigDataEntry!(v1, de1)
203
+ #
204
+ # #get
205
+ # @test deepcopy(de1) == getBigDataEntry(v1, :key1)
206
+ # @test deepcopy(de2) == getBigDataEntry(dfg, :a, :key2)
207
+ # @test_throws Any getBigDataEntry(v2, :key1)
208
+ # @test_throws Any getBigDataEntry(dfg, :b, :key1)
209
+ #
210
+ # #update
211
+ # @test updateBigDataEntry!(dfg, :a, de2_update)
212
+ # @test deepcopy(de2_update) == getBigDataEntry(dfg, :a, :key2)
213
+ # @test !updateBigDataEntry!(dfg, :b, de2_update)
214
+ #
215
+ # #list
216
+ # entries = getBigDataEntries(dfg, :a)
217
+ # @test length(entries) == 2
218
+ # @test symdiff(map(e->e.key, entries), [:key1, :key2]) == Symbol[]
219
+ # @test length(getBigDataEntries(dfg, :b)) == 0
220
+ #
221
+ # @test symdiff(getBigDataKeys(dfg, :a), [:key1, :key2]) == Symbol[]
222
+ # @test getBigDataKeys(dfg, :b) == Symbol[]
223
+ #
224
+ # #delete
225
+ # @test deepcopy(de1) == deleteBigDataEntry!(v1, :key1)
226
+ # @test getBigDataKeys(v1) == Symbol[:key2]
227
+ # #delete from dfg
228
+ # @test deepcopy(de2_update) == deleteBigDataEntry!(dfg, :a, :key2)
229
+ # @test getBigDataKeys(v1) == Symbol[]
230
+ # end
231
+ # end
231
232
232
233
@testset " Updating Nodes and Estimates" begin
233
234
global dfg
240
241
:mean => VariableEstimate (:default , :mean , [50.0 ]),
241
242
:modefit => VariableEstimate (:default , :modefit , [75.0 ]))
242
243
# update
243
- mergeUpdateVariableSolverData ! (dfg, newvar)
244
+ updateVariableSolverData ! (dfg, newvar)
244
245
245
246
# Check if variable is updated
246
247
var = getVariable (dfg, :a )
255
256
# Confirm they're different
256
257
@test estimates (newvar) != estimates (var)
257
258
# Persist it.
258
- mergeUpdateVariableSolverData ! (dfg, newvar)
259
+ updateVariableSolverData ! (dfg, newvar)
259
260
# Get the latest
260
261
var = getVariable (dfg, :a )
261
262
@test symdiff (collect (keys (estimates (var))), [:default , :second ]) == Symbol[]
269
270
# confirm delete
270
271
@test symdiff (collect (keys (estimates (newvar))), [:second ]) == Symbol[]
271
272
# Persist it.
272
- mergeUpdateVariableSolverData ! (dfg, newvar)
273
+ updateVariableSolverData ! (dfg, newvar)
273
274
274
275
# Get the latest and confirm they're the same, :second
275
276
var = getVariable (dfg, :a )
0 commit comments