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
df061b25
Commit
df061b25
authored
Apr 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fa71d1df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+24
-13
No files found.
wcfs/δbtail_test.go
View file @
df061b25
...
@@ -774,25 +774,36 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
...
@@ -774,25 +774,36 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
// xverifyΔBtail_Get verifies δBtail.Get on series of vt ZODB changes.
// xverifyΔBtail_Get verifies δBtail.Get on series of vt ZODB changes.
// XXX
// XXX
func
xverifyΔBTail_Get
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
vt
...*
tTreeCommit
)
{
func
xverifyΔBTail_Get
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
vt
...*
tTreeCommit
)
{
return
subj
=
vt
[
0
]
.
tree
tkeys
:=
allTestKeys
(
vt
...
)
for
_
,
t
:=
range
vt
[
1
:
]
{
tkeyv
:=
tkeys
.
SortedKeys
()
subj
+=
"→"
+
t
.
tree
}
// verify t1->t2-> ... ->tn Track(keys) Get(keys, @at)
t
.
Run
(
fmt
.
Sprintf
(
"Get/%s"
,
subj
),
func
(
t
*
testing
.
T
)
{
// for all combinations of tracked keys and at
for
i
:=
range
vt
{
for
kidx
:=
range
IntSets
(
len
(
tkeyv
))
{
fmt
.
Printf
(
"at%d = %s
\n
"
,
i
,
vt
[
i
]
.
at
)
keys
:=
SetKey
{}
for
_
,
idx
:=
range
kidx
{
keys
.
Add
(
tkeyv
[
idx
])
}
}
xverifyΔBTail_Get1
(
t
,
subj
,
db
,
treeRoot
,
vt
,
keys
)
tkeys
:=
allTestKeys
(
vt
...
)
}
tkeyv
:=
tkeys
.
SortedKeys
()
// verify t1->t2-> ... ->tn Track(keys) Get(keys, @at)
// for all combinations of tracked keys and at
for
kidx
:=
range
IntSets
(
len
(
tkeyv
))
{
keys
:=
SetKey
{}
for
_
,
idx
:=
range
kidx
{
keys
.
Add
(
tkeyv
[
idx
])
}
t
.
Run
(
fmt
.
Sprintf
(
"track=%s"
,
keys
),
func
(
t
*
testing
.
T
)
{
xverifyΔBTail_Get1
(
t
,
db
,
treeRoot
,
vt
,
keys
)
})
}
})
}
}
func
xverifyΔBTail_Get1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
vt
[]
*
tTreeCommit
,
keys
SetKey
)
{
func
xverifyΔBTail_Get1
(
t
*
testing
.
T
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
vt
[]
*
tTreeCommit
,
keys
SetKey
)
{
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
// XXX subj here ?
// XXX tracked / ?
// XXX tracked / ?
// t1->t2-> ... -> tn
// t1->t2-> ... -> tn
...
...
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