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
cc0e6515
Commit
cc0e6515
authored
Jun 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
16eb6224
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+18
-13
No files found.
wcfs/δbtail_test.go
View file @
cc0e6515
...
...
@@ -486,28 +486,33 @@ func TestΔBTreeAllStructs(t *testing.T) {
v
=
keysv2
rng
.
Shuffle
(
len
(
v
),
func
(
i
,
j
int
)
{
v
[
i
],
v
[
j
]
=
v
[
j
],
v
[
i
]
})
// generate case
: keysv1[i] -> keysv2[i] with values generated randomly
// along the way.
// generate case
s: keysv1[i] -> keysv2[i] with values generated
//
randomly
along the way.
vv
:=
"abcdefgh"
randv
:=
func
()
string
{
i
:=
rng
.
Intn
(
len
(
vv
))
return
vv
[
i
:
i
+
1
]
}
for
i
:=
range
keysv1
{
keys1
:=
keysv1
[
i
]
keys2
:=
keysv2
[
i
]
kv1
:=
map
[
Key
]
string
{}
kv2
:=
map
[
Key
]
string
{}
for
k
:=
range
keys1
{
kv1
[
Key
(
k
)]
=
randv
()
}
for
k
:=
range
keys2
{
kv2
[
Key
(
k
)]
=
randv
()
}
testq
:=
make
(
chan
string
)
go
func
()
{
defer
close
(
testq
)
for
i
:=
range
keysv1
{
keys1
:=
keysv1
[
i
]
keys2
:=
keysv2
[
i
]
// given (kv1, kv2) test on automatically generated (tree1 -> tree2)
fmt
.
Printf
(
"%s -> %s
\n
"
,
kvtxt
(
kv1
),
kvtxt
(
kv2
))
kv1
:=
map
[
Key
]
string
{}
kv2
:=
map
[
Key
]
string
{}
for
k
:=
range
keys1
{
kv1
[
Key
(
k
)]
=
randv
()
}
for
k
:=
range
keys2
{
kv2
[
Key
(
k
)]
=
randv
()
}
}
// given (kv1, kv2) test on automatically generated (tree1 -> tree2)
fmt
.
Printf
(
"%s -> %s
\n
"
,
kvtxt
(
kv1
),
kvtxt
(
kv2
))
_
=
maxdepth
;
_
=
maxsplit
;
_
=
n
;
_
=
rng
}
}()
testΔBTail
(
t
,
testq
)
}
...
...
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