Commit 6e619d3d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2374d598
...@@ -24,7 +24,7 @@ package xbtree ...@@ -24,7 +24,7 @@ package xbtree
// //
// 1) to verify treediff algorithm, and // 1) to verify treediff algorithm, and
// 2) to verify how ΔTtail rebuilds its history entries when set of tracked keys // 2) to verify how ΔTtail rebuilds its history entries when set of tracked keys
// grow upon either new Track requests, or upon Update that turned out to // grows upon either new Track requests, or upon Update that turned out to
// trigger such growth of set of tracked keys. // trigger such growth of set of tracked keys.
// //
// TestΔBTail*/Update and TestΔBTail*/rebuild exercise points "1" and "2" correspondingly. // TestΔBTail*/Update and TestΔBTail*/rebuild exercise points "1" and "2" correspondingly.
...@@ -68,7 +68,7 @@ type Δstring = xbtreetest.Δstring ...@@ -68,7 +68,7 @@ type Δstring = xbtreetest.Δstring
// ex δ(T/B1:a, T2/B1:b-B3:c) = {-1:a +1:b +3:c} // ex δ(T/B1:a, T2/B1:b-B3:c) = {-1:a +1:b +3:c}
// //
// Δ(T, Av, Bv) - subset of δ(Av, Bv) corresponding to initial tracking set T // Δ(T, Av, Bv) - subset of δ(Av, Bv) corresponding to initial tracking set T
// ex Δ({1}, T/B1:a, T2/B1:b-B3:c) = {-1:a +1:b} (no +3:c) XXX fix example // ex Δ({1}, T/B1:a, T2/B1:b-B3:c) = {-1:a +1:b} (no +3:c) XXX fix example +3 here
// //
// kadj(A,B) {} k -> {k'}: - adjacency matrix // kadj(A,B) {} k -> {k'}: - adjacency matrix
// ∃v1,v2: k'∈ Δ({k}, Av1, Bv2) // ∃v1,v2: k'∈ Δ({k}, Av1, Bv2)
...@@ -718,7 +718,7 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod ...@@ -718,7 +718,7 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
// also call _Update1 directly to verify δtkeycov return from treediff // also call _Update1 directly to verify δtkeycov return from treediff
// the result of Update and _Update1 should be the same since δbtail is initially empty. // the result of Update and _Update1 should be the same since δbtail is initially empty.
δbtail_ := δbtail.Clone() δbtail_ := δbtail.Clone()
δB1, err := δbtail_._Update1(δZ); X(err) // XXX don't compute treediff twice δB1, err := δbtail_._Update1(δZ); X(err)
// assert tkeyCov1 ⊂ tkeyCov2 // assert tkeyCov1 ⊂ tkeyCov2
dkeycov12 := tkeyCov1.Difference(tkeyCov2) dkeycov12 := tkeyCov1.Difference(tkeyCov2)
...@@ -1221,7 +1221,7 @@ func TestΔBtailSliceByRootRev(t_ *testing.T) { ...@@ -1221,7 +1221,7 @@ func TestΔBtailSliceByRootRev(t_ *testing.T) {
t1.At: "at1", t1.At: "at1",
t2.At: "at2", t2.At: "at2",
} }
at2t := map[zodb.Tid]*xbtreetest.Commit{ // XXX -> move to treeenv ? at2t := map[zodb.Tid]*xbtreetest.Commit{ // XXX -> move to treeenv
t0.At: t0, t0.At: t0,
t1.At: t1, t1.At: t1,
t2.At: t2, t2.At: t2,
...@@ -1556,7 +1556,7 @@ func assertΔTtail(t *testing.T, subj string, δbtail *ΔBtail, tj *xbtreetest.C ...@@ -1556,7 +1556,7 @@ func assertΔTtail(t *testing.T, subj string, δbtail *ΔBtail, tj *xbtreetest.C
l := len(vδTok) l := len(vδTok)
var vatOK []zodb.Tid var vatOK []zodb.Tid
var vδTok_ []map[Key]Δstring var vδTok_ []map[Key]Δstring
at2t := map[zodb.Tid]*xbtreetest.Commit{tj.At: tj} at2t := map[zodb.Tid]*xbtreetest.Commit{tj.At: tj} // XXX -> xbtreetest.T
t0 := tj t0 := tj
for i := 0; i<l; i++ { for i := 0; i<l; i++ {
// empty vδTok entries means they should be absent in vδT // empty vδTok entries means they should be absent in vδT
......
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