Commit 4f20f158 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d4853cc9
......@@ -343,6 +343,7 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
}
}
// Verify ΔBTail for explicitly provided tree topologies.
func TestΔBTail(t *testing.T) {
X := exc.Raiseif
......@@ -402,35 +403,6 @@ func TestΔBTail(t *testing.T) {
return δZ
}
/*
XXX := func(tree1, tree2 string) {
// XXX commit tree1
// XXX load tree1 -> get keys for kv1
//
// XXX for all set of {keys} from kv1:
// // prepare initial state with {keys} tracked
// zconn = db.open(at)
// δbtail = NewΔBTail(zconn.At())
// for k in keys:
// v, path = tree.VGet(k)
// δbtail.Track(path)
//
// commit(->tree2)
// δZ = ...
//
// δB = δbtail.Update(δZ)
//
// verify δB has all keys as expected for tracked set
_, err := tg.Commit(tree1); X(err)
kv1 := XGetTree(db, tg.head, tg.treeRoot)
fmt.Println(kv1)
_, err = tg.Commit(tree2); X(err)
kv2 := XGetTree(db, tg.head, tg.treeRoot)
fmt.Println(kv2)
}
*/
at1 := tg.head
kv1 := XGetTree(db, at1, tg.treeRoot)
tree1 := "ø" // initial
......@@ -446,8 +418,6 @@ func TestΔBTail(t *testing.T) {
kv1 = kv2
tree1 = tree2
}
// TODO reverse tree_i <- tree_{i+1}
}
func TestΔBTreeAllStructs(t *testing.T) {
......@@ -456,6 +426,9 @@ func TestΔBTreeAllStructs(t *testing.T) {
// ---- misc ----
// IntSets generates all sets of integers in range [0,N)
func IntSets(N int) chan []int {
ch := make(chan []int)
......
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