@@ -130,12 +130,15 @@ function compareAll(Al::T,
130
130
return true
131
131
end
132
132
133
- function compareAll (Al:: T , Bl:: T ; show:: Bool = true , skip:: Vector{Symbol} = Symbol[]) where T
134
- @debug " Comparing types $T :"
133
+ function compareAll (Al:: T1 , Bl:: T2 ; show:: Bool = true , skip:: Vector{Symbol} = Symbol[]) where {T1,T2}
134
+ @debug " Comparing types $T1 , $T2 "
135
+ if T1 != T2
136
+ @warn " Types are different" T1 T2
137
+ end
135
138
# @debug " Al = $Al"
136
139
# @debug " Bl = $Bl"
137
140
! compareFields (Al, Bl, show= show, skip= skip) && return false
138
- for field in fieldnames (T )
141
+ for field in fieldnames (T1 )
139
142
field in skip && continue
140
143
@debug (" Checking field: $field " )
141
144
(! isdefined (Al, field) && ! isdefined (Al, field)) && return true
@@ -236,8 +239,14 @@ function compareFactor(A::DFGFactor,
236
239
skipsamples:: Bool = true ,
237
240
skipcompute:: Bool = true )
238
241
#
239
- skip_ =
240
- TP = compareAll (A, B, skip= union ([:attributes ;:solverData ;:_variableOrderSymbols ;:_gradients ],skip), show= show)
242
+ skip_ = union ([:attributes ;:solverData ;:_variableOrderSymbols ;:_gradients ],skip)
243
+ TP = compareAll (A, B, skip= skip_, show= show)
244
+ # TP = compareAll(A.label, B.label, skip=skip_, show=show)
245
+ # TP = compareAll(A.timestamp, B.timestamp, skip=skip_, show=show)
246
+ # TP = compareAll(A.nstime, B.nstime, skip=skip_, show=show)
247
+ # TP = compareAll(A.tags, B.tags, skip=skip_, show=show)
248
+ # TP = compareAll(A.solvable, B.solvable, skip=skip_, show=show)
249
+ # TP = compareAll(A._variableOrderSymbols, B._variableOrderSymbols, skip=skip_, show=show)
241
250
# TP = TP & compareAll(A.attributes, B.attributes, skip=[:data;], show=show)
242
251
TP = TP & compareAllSpecial (getSolverData (A), getSolverData (B), skip= union ([:fnc ;:_gradients ], skip), show= show)
243
252
if :fnc in skip
0 commit comments