Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
6e619d3d
Commit
6e619d3d
authored
Sep 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
2374d598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+5
-5
No files found.
wcfs/internal/xbtree/δbtail_test.go
View file @
6e619d3d
...
@@ -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
// grow
s
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment