Commit 333b6877 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7e7f0f94
...@@ -834,6 +834,19 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod ...@@ -834,6 +834,19 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
δbtail.assertTrack(t, "2", trackSet2, ø) δbtail.assertTrack(t, "2", trackSet2, ø)
// assert δtkeycov == δ(tkeyCov1, tkeyCov2)
δtkeycovOK := tkeyCov2.Difference(tkeyCov1)
fmt.Printf("tkeyCov1: %s\n", tkeyCov1)
fmt.Printf("tkeyCov2: %s\n", tkeyCov2)
fmt.Printf("δtkeycov: %s\n", δtkeycovOK)
δtkeycov := &RangedKeySet{}
if __, ok := δB1.ByRoot[treeRoot]; ok {
δtkeycov = __.δtkeycov1
}
if !δtkeycov.Equal(δtkeycovOK) {
badf("δtkeycov wrong:\nhave: %s\nwant: %s", δtkeycov, δtkeycovOK)
}
// assert δB.ByRoot == {treeRoot -> ...} if δTok != ø // assert δB.ByRoot == {treeRoot -> ...} if δTok != ø
// == ø if δTok == ø // == ø if δTok == ø
rootsOK := SetOid{} rootsOK := SetOid{}
...@@ -852,13 +865,6 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod ...@@ -852,13 +865,6 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
return return
} }
// assert δtkeycov == δ(tkeyCov1, tkeyCov2)
δtkeycovOK := tkeyCov2.Difference(tkeyCov1)
δtkeycov := δB1.ByRoot[treeRoot].δtkeycov1
if !δtkeycov.Equal(δtkeycovOK) {
badf("δtkeycov wrong:\nhave: %s\nwant: %s", δtkeycov, δtkeycovOK)
}
// δT <- δB // δT <- δB
δToid := δB.ΔByRoot[treeRoot] // {} k -> δoid δToid := δB.ΔByRoot[treeRoot] // {} k -> δoid
...@@ -1686,6 +1692,10 @@ func TestΔBTail(t *testing.T) { ...@@ -1686,6 +1692,10 @@ func TestΔBTail(t *testing.T) {
"T/T/B0:a", "T/T/B0:a",
"T/B0:a", "T/B0:a",
// δtkeycov grows due to change in parent tree only
"T3/B1:a,2:b-B8:c,9:d",
"T7/B1:a,2:b-B8:c,9:d",
// "T/T/T/B1:a,2:b", // "T/T/T/B1:a,2:b",
// "T/T/B1:a", // "T/T/B1:a",
......
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