fix whitespace
This commit is contained in:
parent
d94663d310
commit
0eec315f95
1 changed files with 21 additions and 22 deletions
|
@ -4,37 +4,36 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var tests = []pipedata{
|
||||||
var tests = []pipedata{
|
{0, []int{2}},
|
||||||
{0, []int{2}},
|
{1, []int{1}},
|
||||||
{1, []int{1}},
|
{2, []int{0, 3, 4}},
|
||||||
{2, []int{0, 3, 4}},
|
{3, []int{2, 4}},
|
||||||
{3, []int{2, 4}},
|
{4, []int{2, 3, 6}},
|
||||||
{4, []int{2, 3, 6}},
|
{5, []int{6}},
|
||||||
{5, []int{6}},
|
{6, []int{4, 5}},
|
||||||
{6, []int{4, 5}},
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func TestCountPipes(t *testing.T) {
|
func TestCountPipes(t *testing.T) {
|
||||||
v := CountPipes(tests)
|
v := CountPipes(tests)
|
||||||
if v != 6 {
|
if v != 6 {
|
||||||
t.Error(
|
t.Error(
|
||||||
"For", tests,
|
"For", tests,
|
||||||
"expected 6",
|
"expected 6",
|
||||||
"got", v,
|
"got", v,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestCountGroups(t *testing.T) {
|
func TestCountGroups(t *testing.T) {
|
||||||
seen := make(map[int]int)
|
seen := make(map[int]int)
|
||||||
v,_ := CountGroups(seen, tests)
|
v,_ := CountGroups(seen, tests)
|
||||||
if v != 2 {
|
if v != 2 {
|
||||||
t.Error(
|
t.Error(
|
||||||
"For", tests,
|
"For", tests,
|
||||||
"expected 2",
|
"expected 2",
|
||||||
"got", v,
|
"got", v,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue