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
ad16d5bf
Commit
ad16d5bf
authored
Jun 01, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bb52c1f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+9
-9
No files found.
wcfs/δbtail_test.go
View file @
ad16d5bf
...
...
@@ -227,18 +227,18 @@ func XGetKV(db *zodb.DB, at zodb.Tid, kvOid map[Key]Value) map[Key]string {
func
xverifyΔBTail
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
kv1
,
kv2
map
[
Key
]
string
,
δZ
*
zodb
.
EventCommit
)
{
d12
:=
kvdiff
(
kv1
,
kv2
)
// verify transition at1->at2 for all initial states of tracked {keys} from kv1 + ∞
keyv1
:=
[]
Key
{
10000
}
// inf, simulating ZBigFile.Size() query
for
k
1
:=
range
kv1
{
keyv1
=
append
(
keyv1
,
k1
)
}
sort
.
Slice
(
keyv1
,
func
(
i
,
j
int
)
bool
{
return
keyv1
[
i
]
<
keyv1
[
j
]
// verify transition at1->at2 for all initial states of tracked {keys} from kv1 +
kv2 +
∞
allKeys
:=
SetKey
{};
allKeys
.
Add
(
10000
)
// inf, simulating ZBigFile.Size() query
for
k
:=
range
kv1
{
allKeys
.
Add
(
k
)
}
for
k
:=
range
kv2
{
allKeys
.
Add
(
k
)
}
allKeyv
:=
allKeys
.
Elements
()
sort
.
Slice
(
allKeyv
,
func
(
i
,
j
int
)
bool
{
return
allKeyv
[
i
]
<
allKeyv
[
j
]
})
for
kidx
:=
range
IntSets
(
len
(
keyv1
))
{
for
kidx
:=
range
IntSets
(
len
(
allKeyv
))
{
keys
:=
SetKey
{}
for
_
,
idx
:=
range
kidx
{
keys
.
Add
(
keyv1
[
idx
])
keys
.
Add
(
allKeyv
[
idx
])
}
xverifyΔBTail1
(
t
,
subj
,
db
,
treeRoot
,
at1
,
at2
,
kv1
,
kv2
,
d12
,
δZ
,
keys
)
...
...
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