Commit df061b25 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fa71d1df
...@@ -774,25 +774,36 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod ...@@ -774,25 +774,36 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
// xverifyΔBtail_Get verifies δBtail.Get on series of vt ZODB changes. // xverifyΔBtail_Get verifies δBtail.Get on series of vt ZODB changes.
// XXX // XXX
func xverifyΔBTail_Get(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, vt ...*tTreeCommit) { func xverifyΔBTail_Get(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, vt ...*tTreeCommit) {
return subj = vt[0].tree
tkeys := allTestKeys(vt...) for _, t := range vt[1:] {
tkeyv := tkeys.SortedKeys() subj += "→" + t.tree
}
// verify t1->t2-> ... ->tn Track(keys) Get(keys, @at) t.Run(fmt.Sprintf("Get/%s", subj), func(t *testing.T) {
// for all combinations of tracked keys and at for i := range vt {
for kidx := range IntSets(len(tkeyv)) { fmt.Printf("at%d = %s\n", i, vt[i].at)
keys := SetKey{}
for _, idx := range kidx {
keys.Add(tkeyv[idx])
} }
xverifyΔBTail_Get1(t, subj, db, treeRoot, vt, keys) tkeys := allTestKeys(vt...)
} tkeyv := tkeys.SortedKeys()
// verify t1->t2-> ... ->tn Track(keys) Get(keys, @at)
// for all combinations of tracked keys and at
for kidx := range IntSets(len(tkeyv)) {
keys := SetKey{}
for _, idx := range kidx {
keys.Add(tkeyv[idx])
}
t.Run(fmt.Sprintf("track=%s", keys), func(t *testing.T) {
xverifyΔBTail_Get1(t, db, treeRoot, vt, keys)
})
}
})
} }
func xverifyΔBTail_Get1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, vt []*tTreeCommit, keys SetKey) { func xverifyΔBTail_Get1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, vt []*tTreeCommit, keys SetKey) {
X := exc.Raiseif X := exc.Raiseif
// XXX subj here ?
// XXX tracked / ? // XXX tracked / ?
// t1->t2-> ... -> tn // t1->t2-> ... -> tn
......
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