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
b29f0fbc
Commit
b29f0fbc
authored
Jun 18, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0de6c175
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+18
-3
No files found.
wcfs/δbtail_test.go
View file @
b29f0fbc
...
...
@@ -601,7 +601,7 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
// - outside tracked set -> may be present in δT (kadj gives exact answer)
// δT is subset of d12
for
_
,
k
:=
range
S
ortedKeys
(
δT
)
{
for
_
,
k
:=
range
s
ortedKeys
(
δT
)
{
_
,
ind12
:=
d12
[
k
]
if
ind12
{
badf
(
"δT: [%v] is not in d12"
,
k
)
...
...
@@ -610,7 +610,7 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
// k ∈ tracked set -> must be present in δT
// k ∉ tracked set -> may be present in δT (kadj gives exact answer)
for
_
,
k
:=
range
S
ortedKeys
(
d12
)
{
for
_
,
k
:=
range
s
ortedKeys
(
d12
)
{
_
,
inδT
:=
δT
[
k
]
if
inδT
&&
!
inδTOK
.
Has
(
k
)
{
badf
(
"δT: [%v] is extra"
,
k
)
...
...
@@ -1088,7 +1088,22 @@ func (ks SetKey) String() string {
return
"{"
+
strings
.
Join
(
strv
,
" "
)
+
"}"
}
func
SortedKeys
(
kv
map
[
Key
]
string
)
[]
Key
{
func
(
os
SetOid
)
SortedKeys
()
[]
Oid
{
oidv
:=
os
.
Elements
()
sort
.
Slice
(
oidv
,
func
(
i
,
j
int
)
bool
{
return
oidv
[
i
]
<
oidv
[
j
]
})
return
oidv
}
func
(
os
SetOid
)
String
()
string
{
strv
:=
[]
string
{}
for
_
,
oid
:=
range
os
.
SortedKeys
()
{
strv
=
append
(
strv
,
fmt
.
Sprintf
(
"%s"
,
oid
))
}
return
"{"
+
strings
.
Join
(
strv
,
" "
)
+
"}"
}
func
sortedKeys
(
kv
map
[
Key
]
string
)
[]
Key
{
keyv
:=
[]
Key
{}
for
k
:=
range
kv
{
keyv
=
append
(
keyv
,
k
)
...
...
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