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
a510307c
Commit
a510307c
authored
Jun 07, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a9a56005
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+14
-9
No files found.
wcfs/internal/xbtree/δbtail_test.go
View file @
a510307c
...
...
@@ -47,8 +47,8 @@ import (
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
)
const
kInf
Key
=
10000
// inf key (TeX hack)
//const kInf Key = KeyMax
//
const kInf Key = 10000 // inf key (TeX hack)
//
//
const kInf Key = KeyMax
// XXX move infrastructure -> δbtail_treegen_test.go ?
...
...
@@ -387,7 +387,8 @@ func XGetTree(db *zodb.DB, at zodb.Tid, root zodb.Oid) RBucketSet {
}
rbucketv
:=
RBucketSet
{}
xwalkDFS
(
ctx
,
-
kInf
,
kInf
,
ztree
,
func
(
rb
*
RBucket
)
{
// xwalkDFS(ctx, -kInf, kInf, ztree, func(rb *RBucket) {
xwalkDFS
(
ctx
,
KeyMin
,
KeyMax
,
ztree
,
func
(
rb
*
RBucket
)
{
rbucketv
=
append
(
rbucketv
,
rb
)
})
if
len
(
rbucketv
)
==
0
{
// empty tree -> [-∞, ∞){}
...
...
@@ -398,8 +399,8 @@ func XGetTree(db *zodb.DB, at zodb.Tid, root zodb.Oid) RBucketSet {
ebucket
:=
&
RBucket
{
oid
:
zodb
.
InvalidOid
,
parent
:
etree
,
lo
:
-
kInf
,
hi_
:
kInf
,
lo
:
KeyMin
,
hi_
:
KeyMax
,
kv
:
map
[
Key
]
string
{},
}
rbucketv
=
RBucketSet
{
ebucket
}
...
...
@@ -803,7 +804,8 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
trackedNotInKadj
.
Add
(
k
)
}
}
trackedNotInKadj
.
Del
(
kInf
)
// trackedNotInKadj.Del(kInf)
trackedNotInKadj
.
Del
(
KeyMax
)
if
len
(
trackedNotInKadj
)
>
0
{
badf
(
"BUG: Tracked ∉ kadj[Tracked] ; extra=%v"
,
trackedNotInKadj
)
return
...
...
@@ -1449,8 +1451,10 @@ func TestΔBTail(t *testing.T) {
for
_
,
k
:=
range
keyv
{
ks
.
Add
(
k
)
}
return
ks
}
// oo is shorthand for kInf
const
oo
=
kInf
// // oo is shorthand for kInf
// const oo = kInf
// oo is shorthand for KeyMax
const
oo
=
KeyMax
// A is shorthand for KAdjMatrix
type
A
=
KAdjMatrix
// Δ is shorthand for ΔBTestEntry
...
...
@@ -1932,7 +1936,8 @@ func (xkv RBucketSet) Flatten() map[Key]string {
// allTestKeys returns all keys from vt + ∞.
func
allTestKeys
(
vt
...*
tTreeCommit
)
SetKey
{
allKeys
:=
SetKey
{};
allKeys
.
Add
(
kInf
)
// ∞ simulating ZBigFile.Size() query
// allKeys := SetKey{}; allKeys.Add(kInf) // ∞ simulating ZBigFile.Size() query
allKeys
:=
SetKey
{};
allKeys
.
Add
(
KeyMax
)
// ∞ simulating ZBigFile.Size() query
for
_
,
t
:=
range
vt
{
for
_
,
b
:=
range
t
.
xkv
{
for
k
:=
range
b
.
kv
{
...
...
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