Commit 23fe5f2a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b471d227
...@@ -337,7 +337,7 @@ func IntSets(N int) chan []int { ...@@ -337,7 +337,7 @@ func IntSets(N int) chan []int {
// intSets generates all sets of integers in range [lo,hi) // intSets generates all sets of integers in range [lo,hi)
func intSets(ch chan []int, lo, hi int) { func intSets(ch chan []int, lo, hi int) {
ch <- []int{} // ø ch <- nil // ø
if lo < hi { if lo < hi {
for i := lo; i < hi; i++ { for i := lo; i < hi; i++ {
...@@ -363,7 +363,7 @@ func TestIntSets(t *testing.T) { ...@@ -363,7 +363,7 @@ func TestIntSets(t *testing.T) {
I(0), I(0,1), I(0,1,2), I(0,2), I(0), I(0,1), I(0,1,2), I(0,2),
I(1), I(1,2), I(1), I(1,2),
I(2), I(2),
} }
if !reflect.DeepEqual(got, want) { if !reflect.DeepEqual(got, want) {
t.Fatalf("error:\ngot: %v\nwant: %v", got, want) t.Fatalf("error:\ngot: %v\nwant: %v", got, want)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment