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
0534957b
Commit
0534957b
authored
Jul 09, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
11bed7a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
wcfs/internal/zdata/δftail_test.go
wcfs/internal/zdata/δftail_test.go
+19
-2
No files found.
wcfs/internal/zdata/δftail_test.go
View file @
0534957b
...
...
@@ -108,9 +108,19 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
dataTab
[
zblki
.
Name
]
=
zblki
.
Data
}
xat
:=
map
[
zodb
.
Tid
]
string
{}
// tid > "at<i>"
// δfstr converts δf to string taking xat into account
δfstr
:=
func
(
δf
*
ΔFile
)
string
{
s
:=
fmt
.
Sprintf
(
"{@%s %s"
,
xat
[
δf
.
Rev
],
δf
.
Blocks
)
if
δf
.
Size
{
s
+=
" S"
}
s
+=
"}"
return
s
}
i
:=
0
xat
:=
map
[
zodb
.
Tid
]
string
{}
// tid > "at<i>"
for
test
:=
range
testq
{
i
++
δblk
:=
setI64
{}
...
...
@@ -250,7 +260,14 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
vδf_ok
:=
vδf
[
j
:
k
+
1
]
// [j,k]
vδf_
:=
δftail
.
SliceByFileRev
(
zfile
,
lo
,
hi
)
if
!
reflect
.
DeepEqual
(
vδf_
,
vδf_ok
)
{
t
.
Errorf
(
"slice (@%s,@%s]:
\n
have: %v
\n
want: %v"
,
xat
[
lo
],
xat
[
hi
],
vδf_
,
vδf_ok
)
var
sδf_
,
sδf_ok
[]
string
for
_
,
δf
:=
range
vδf_
{
sδf_
=
append
(
sδf_
,
δfstr
(
δf
))
}
for
_
,
δf
:=
range
vδf_ok
{
sδf_ok
=
append
(
sδf_ok
,
δfstr
(
δf
))
}
t
.
Errorf
(
"slice (@%s,@%s]:
\n
have: %v
\n
want: %v"
,
xat
[
lo
],
xat
[
hi
],
sδf_
,
sδf_ok
)
}
}
}
...
...
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