Commit dc206440 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8ab1fe64
......@@ -604,61 +604,6 @@ func xverifyΔBTail_Update(t *testing.T, subj string, db *zodb.DB, treeRoot zodb
allKeys := allTestKeys(t1, t2)
allKeyv := allKeys.SortedElements()
/*
xkv1 := t1.xkv
xkv2 := t2.xkv
// kadj = {} k -> adjacent keys. if k is tracked -> changes to adjacents must be in δT.
kadj := map[Key]SetKey{}
for k := range allKeys {
adj1 := SetKey{}
adj2 := SetKey{}
q1 := []Key{k}
q2 := []Key{k}
//tracef("\n")
for len(q1) > 0 || len(q2) > 0 {
//tracef("q1: %v\n", q1)
//tracef("q2: %v\n", q2)
if l1 := len(q1); l1 > 0 {
k1 := q1[l1-1]; q1 = q1[:l1-1]
if !adj1.Has(k1) {
for k_ := range xkv1.Get(k1).kv {
adj1.Add(k_)
for k__ := range xkv2.Get(k_).kv {
if !adj2.Has(k__) {
q2 = append(q2, k__)
}
}
}
}
}
if l2 := len(q2); l2 > 0 {
k2 := q2[l2-1]; q2 = q2[:l2-1]
if !adj2.Has(k2) {
for k_ := range xkv2.Get(k2).kv {
adj2.Add(k_)
for k__ := range xkv1.Get(k_).kv {
if !adj1.Has(k__) {
q1 = append(q1, k__)
}
}
}
}
}
}
adj := SetKey{}; adj.Add(k); adj.Update(adj1); adj.Update(adj2)
kadj[k] = adj
}
if kadjOK != nil && !reflect.DeepEqual(kadj, kadjOK) {
t.Errorf("%s: BUG: computed kadj is wrong:\nkadjOK: %v\nkadj : %v\n\n", subj, kadjOK, kadj)
}
*/
kadj12 := KAdj(t1, t2)
// verify at1->at2 for all combination of initial tracked keys.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment