Commit ed81f1bb authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e9ecca3a
......@@ -316,9 +316,9 @@ func (tidx trackIndex) verify() {
// Update tidx with trees subsets from tidx2.
func (tidx trackIndex) Update(tidx2 trackIndex) {
//fmt.Printf("\n\nUpdate:\n")
//fmt.Printf("tidx: %s\n", tidx)
//fmt.Printf("tidx2: %s\n", tidx2)
fmt.Printf("\n\nUpdate:\n")
fmt.Printf("tidx: %s\n", tidx)
fmt.Printf("tidx2: %s\n", tidx2)
tidx.verify()
tidx2.verify()
......@@ -339,13 +339,13 @@ func (tidx trackIndex) Update(tidx2 trackIndex) {
}
t.nchild += t2.nchild
}
/*
if t.parent != zodb.InvalidOid {
δnchild[t.parent]
if t.parent != zodb.InvalidOid {
// this node is already present in both trees
// compensate for that in its parent (which must be present)
tidx[t.parent].nchild--
}
}
*/
}
tidx.verify()
......
......@@ -641,7 +641,7 @@ func xverifyΔBTail_Update(t *testing.T, subj string, db *zodb.DB, treeRoot zodb
// xverifyΔBTail_Update1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// tracked state defined by initialTrackedKeys.
func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, xkv1,xkv2 RBucketSet, δZ *zodb.EventCommit, initialTrackedKeys SetKey, kadj map[Key]SetKey) {
func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, xkv1,xkv2 RBucketSet, δZ *zodb.EventCommit, initialTrackedKeys SetKey, kadj KAdjMatrix) {
X := exc.Raiseif
tracef("\n>>> Track=%s\n", initialTrackedKeys)
......@@ -865,7 +865,7 @@ func xverifyΔBTail_rebuild(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, t0, t1
keys1.Add(tAllKeyv[idx1])
}
t.Run(fmt.Sprintf(" T(%s);R", keys1), func(t *testing.T) {
t.Run(fmt.Sprintf(" T%s;R", keys1), func(t *testing.T) {
δbtail := NewΔBtail(t0.at, db)
// assert trackIdx=ø, trackNew=ø, vδB=[]
......@@ -895,7 +895,7 @@ func xverifyΔBTail_rebuild(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, t0, t1
keys2.Add(tRestKeyv2[idx2])
}
t.Run(fmt.Sprintf(" →%s T(%s);R", t2.tree, keys2), func(t *testing.T) {
t.Run(fmt.Sprintf(" →%s T%s;R", t2.tree, keys2), func(t *testing.T) {
// XXX implement Clone and go the clone way if test starts running too slow
//δbtail_ := δbtail.Clone()
......@@ -1056,8 +1056,8 @@ func xverifyΔBTail_Get1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, vt []*tTr
// ΔBTestEntry represents one entry in ΔBTail tests.
type ΔBTestEntry struct {
tree string // next tree topology
kadjOK map[Key]SetKey // adjacency matrix against previous case (optional)
tree string // next tree topology
kadjOK KAdjMatrix // adjacency matrix against previous case (optional)
}
// ΔBTest converts xtest into ΔBTestEntry.
......@@ -1195,8 +1195,8 @@ func TestΔBTail(t *testing.T) {
}
// oo is shorthand for kInf
const oo = kInf
// A is shorthand for map[Key]SetKey
type A = map[Key]SetKey
// A is shorthand for KAdjMatrix
type A = KAdjMatrix
// Δ is shorthand for ΔBTestEntry
Δ := func(tree string, kadjOK A) (test ΔBTestEntry) {
test.tree = tree
......
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