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
// xverifyΔBtail_Get verifies δBtail.Get on series of vt ZODB changes.
// XXX
func xverifyΔBTail_Get(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, vt ...*tTreeCommit) {
return
tkeys := allTestKeys(vt...)
tkeyv := tkeys.SortedKeys()
subj = vt[0].tree
for _, t := range vt[1:] {
subj += "→" + t.tree
}
// 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("Get/%s", subj), func(t *testing.T) {
for i := range vt {
fmt.Printf("at%d = %s\n", i, vt[i].at)
}
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
// XXX subj here ?
// XXX tracked / ?
// 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