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
3ab3c61d
Commit
3ab3c61d
authored
Sep 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
97ecc0ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
24 deletions
+23
-24
wcfs/internal/zdata/δftail_test.go
wcfs/internal/zdata/δftail_test.go
+23
-24
No files found.
wcfs/internal/zdata/δftail_test.go
View file @
3ab3c61d
...
@@ -646,30 +646,6 @@ func TestΔFtailSliceUntrackedUniform(t_ *testing.T) {
...
@@ -646,30 +646,6 @@ func TestΔFtailSliceUntrackedUniform(t_ *testing.T) {
}
}
// dataTabTxt returns string representation of {} dataTab.
func
dataTabTxt
(
dataTab
map
[
string
]
string
)
string
{
// XXX dup wrt xbtreetest.KVTxt but uses string instead of Key for keys.
if
len
(
dataTab
)
==
0
{
return
"ø"
}
keyv
:=
[]
string
{}
for
k
:=
range
dataTab
{
keyv
=
append
(
keyv
,
k
)
}
sort
.
Strings
(
keyv
)
sv
:=
[]
string
{}
for
_
,
k
:=
range
keyv
{
v
:=
dataTab
[
k
]
if
strings
.
ContainsAny
(
v
,
"
\n\t
,:"
)
{
panicf
(
"[%v]=%q: invalid value"
,
k
,
v
)
}
sv
=
append
(
sv
,
fmt
.
Sprintf
(
"%v:%s"
,
k
,
v
))
}
return
strings
.
Join
(
sv
,
","
)
}
// newT creates new T.
// newT creates new T.
func
newT
(
t
*
testing
.
T
)
*
T
{
func
newT
(
t
*
testing
.
T
)
*
T
{
t
.
Helper
()
t
.
Helper
()
...
@@ -757,6 +733,29 @@ func (t *T) vδfstr(vδf []*ΔFile) string {
...
@@ -757,6 +733,29 @@ func (t *T) vδfstr(vδf []*ΔFile) string {
}
}
// dataTabTxt returns string representation of {} dataTab.
func
dataTabTxt
(
dataTab
map
[
string
]
string
)
string
{
// XXX dup wrt xbtreetest.KVTxt but uses string instead of Key for keys.
if
len
(
dataTab
)
==
0
{
return
"ø"
}
keyv
:=
[]
string
{}
for
k
:=
range
dataTab
{
keyv
=
append
(
keyv
,
k
)
}
sort
.
Strings
(
keyv
)
sv
:=
[]
string
{}
for
_
,
k
:=
range
keyv
{
v
:=
dataTab
[
k
]
if
strings
.
ContainsAny
(
v
,
"
\n\t
,:"
)
{
panicf
(
"[%v]=%q: invalid value"
,
k
,
v
)
}
sv
=
append
(
sv
,
fmt
.
Sprintf
(
"%v:%s"
,
k
,
v
))
}
return
strings
.
Join
(
sv
,
","
)
}
// b is shorthand to create setI64(blocks).
// b is shorthand to create setI64(blocks).
func
b
(
blocks
...
int64
)
setI64
{
func
b
(
blocks
...
int64
)
setI64
{
...
...
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