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
a618da28
Commit
a618da28
authored
4 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c4f1909f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+13
-6
No files found.
wcfs/δbtail_test.go
View file @
a618da28
...
...
@@ -339,11 +339,13 @@ func IntSets(N int) chan []int {
func
intSets
(
ch
chan
[]
int
,
lo
,
hi
int
)
{
ch
<-
[]
int
{}
// ø
if
lo
<
hi
-
1
{
chTail
:=
make
(
chan
[]
int
)
go
intSets
(
chTail
,
lo
+
1
,
hi
)
for
tail
:=
range
chTail
{
ch
<-
append
([]
int
{
lo
},
tail
...
)
// lo + tail
for
i
:=
lo
;
i
<
hi
;
i
++
{
if
i
<
hi
-
1
{
chTail
:=
make
(
chan
[]
int
)
go
intSets
(
chTail
,
i
+
1
,
hi
)
for
tail
:=
range
chTail
{
ch
<-
append
([]
int
{
i
},
tail
...
)
// i + tail
}
}
}
...
...
@@ -357,7 +359,12 @@ func TestIntSets(t *testing.T) {
}
I
:=
func
(
v
...
int
)
[]
int
{
return
v
}
want
:=
[][]
int
{
I
(),
I
(
0
),
I
(
1
),
I
(
2
)
/* XXX */
}
want
:=
[][]
int
{
I
(),
I
(
0
),
I
(
0
,
1
),
I
(
0
,
2
),
I
(
0
,
1
,
2
),
I
(
1
),
I
(
2
),
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Fatalf
(
"error:
\n
got: %v
\n
want: %v"
,
got
,
want
)
...
...
This diff is collapsed.
Click to expand it.
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