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
c4f1909f
Commit
c4f1909f
authored
May 31, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
46c44e54
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+17
-0
No files found.
wcfs/δbtail_test.go
View file @
c4f1909f
...
@@ -27,6 +27,7 @@ import (
...
@@ -27,6 +27,7 @@ import (
"io/ioutil"
"io/ioutil"
"os"
"os"
"os/exec"
"os/exec"
"reflect"
"regexp"
"regexp"
"sort"
"sort"
"strings"
"strings"
...
@@ -218,6 +219,7 @@ func verifyΔBTail(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1, at2 zodb.T
...
@@ -218,6 +219,7 @@ func verifyΔBTail(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1, at2 zodb.T
// tracked state defined by initialTrackedKeys.
// tracked state defined by initialTrackedKeys.
func
verifyΔBTail1
(
t
*
testing
.
T
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
kv1
,
kv2
map
[
Key
]
string
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
[]
Key
)
{
func
verifyΔBTail1
(
t
*
testing
.
T
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
kv1
,
kv2
map
[
Key
]
string
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
[]
Key
)
{
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
fmt
.
Println
(
"verify1"
,
initialTrackedKeys
)
txn
,
ctx
:=
transaction
.
New
(
context
.
Background
())
txn
,
ctx
:=
transaction
.
New
(
context
.
Background
())
defer
txn
.
Abort
()
defer
txn
.
Abort
()
...
@@ -248,6 +250,7 @@ func TestΔBTail(t *testing.T) {
...
@@ -248,6 +250,7 @@ func TestΔBTail(t *testing.T) {
testv
:=
[]
string
{
testv
:=
[]
string
{
"T/B:"
,
"T/B:"
,
"T/B1:a"
,
"T/B1:a"
,
"T/B2:b"
,
// XXX
// XXX
}
}
...
@@ -346,3 +349,17 @@ func intSets(ch chan []int, lo, hi int) {
...
@@ -346,3 +349,17 @@ func intSets(ch chan []int, lo, hi int) {
close
(
ch
)
close
(
ch
)
}
}
func
TestIntSets
(
t
*
testing
.
T
)
{
got
:=
[][]
int
{}
for
is
:=
range
IntSets
(
3
)
{
got
=
append
(
got
,
is
)
}
I
:=
func
(
v
...
int
)
[]
int
{
return
v
}
want
:=
[][]
int
{
I
(),
I
(
0
),
I
(
1
),
I
(
2
)
/* XXX */
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Fatalf
(
"error:
\n
got: %v
\n
want: %v"
,
got
,
want
)
}
}
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