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
42b6e542
Commit
42b6e542
authored
Jun 03, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c78dc0d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
wcfs/internal/xbtree/rangeset.go
wcfs/internal/xbtree/rangeset.go
+1
-2
wcfs/internal/xbtree/rangeset_test.go
wcfs/internal/xbtree/rangeset_test.go
+4
-4
No files found.
wcfs/internal/xbtree/rangeset.go
View file @
42b6e542
...
@@ -150,7 +150,7 @@ func (S *RangeSet) AddRange(r Range) {
...
@@ -150,7 +150,7 @@ func (S *RangeSet) AddRange(r Range) {
// done
// done
}
}
// Del removes Range r from the set.
// Del
Range
removes Range r from the set.
func
(
S
*
RangeSet
)
DelRange
(
r
Range
)
{
func
(
S
*
RangeSet
)
DelRange
(
r
Range
)
{
if
traceRangeSet
{
if
traceRangeSet
{
fmt
.
Printf
(
"
\n\n
DelRange:
\n
"
)
fmt
.
Printf
(
"
\n\n
DelRange:
\n
"
)
...
@@ -162,7 +162,6 @@ func (S *RangeSet) DelRange(r Range) {
...
@@ -162,7 +162,6 @@ func (S *RangeSet) DelRange(r Range) {
S
.
verify
()
S
.
verify
()
defer
S
.
verify
()
defer
S
.
verify
()
return
// XXX temp
panic
(
"TODO"
)
// XXX
panic
(
"TODO"
)
// XXX
}
}
...
...
wcfs/internal/xbtree/rangeset_test.go
View file @
42b6e542
...
@@ -110,13 +110,13 @@ func TestRangeSet(t *testing.T) {
...
@@ -110,13 +110,13 @@ func TestRangeSet(t *testing.T) {
for
_
,
tt
:=
range
testv
{
for
_
,
tt
:=
range
testv
{
U
:=
tt
.
A
.
Union
(
tt
.
B
)
U
:=
tt
.
A
.
Union
(
tt
.
B
)
//
D := tt.A.Difference(tt.B)
D
:=
tt
.
A
.
Difference
(
tt
.
B
)
if
!
U
.
Equal
(
tt
.
Union
)
{
if
!
U
.
Equal
(
tt
.
Union
)
{
t
.
Errorf
(
"Union:
\n
A: %s
\n
B: %s
\n
->u: %s
\n
okU: %s
\n
"
,
tt
.
A
,
tt
.
B
,
U
,
tt
.
Union
)
t
.
Errorf
(
"Union:
\n
A: %s
\n
B: %s
\n
->u: %s
\n
okU: %s
\n
"
,
tt
.
A
,
tt
.
B
,
U
,
tt
.
Union
)
}
}
//
if !D.Equal(tt.Difference) {
if
!
D
.
Equal
(
tt
.
Difference
)
{
//
t.Errorf("Difference:\n A: %s\n B: %s\n ->d: %s\n okD: %s\n", tt.A, tt.B, D, tt.Difference)
t
.
Errorf
(
"Difference:
\n
A: %s
\n
B: %s
\n
->d: %s
\n
okD: %s
\n
"
,
tt
.
A
,
tt
.
B
,
D
,
tt
.
Difference
)
//
}
}
}
}
}
}
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