main: push TestPrefixOArgs testcase struct into TestPrefixOArgs
No need to have it declared globally.
This commit is contained in:
parent
c3c9513e65
commit
8c9a1c1121
@ -5,18 +5,16 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testcase struct {
|
|
||||||
// i is the input
|
|
||||||
i []string
|
|
||||||
// o is the expected output
|
|
||||||
o []string
|
|
||||||
// Do we expect an error?
|
|
||||||
e bool
|
|
||||||
}
|
|
||||||
|
|
||||||
// TestPrefixOArgs checks that the "-o x,y,z" parsing works correctly.
|
// TestPrefixOArgs checks that the "-o x,y,z" parsing works correctly.
|
||||||
func TestPrefixOArgs(t *testing.T) {
|
func TestPrefixOArgs(t *testing.T) {
|
||||||
testcases := []testcase{
|
testcases := []struct {
|
||||||
|
// i is the input
|
||||||
|
i []string
|
||||||
|
// o is the expected output
|
||||||
|
o []string
|
||||||
|
// Do we expect an error?
|
||||||
|
e bool
|
||||||
|
}{
|
||||||
{
|
{
|
||||||
i: nil,
|
i: nil,
|
||||||
o: nil,
|
o: nil,
|
||||||
|
Loading…
Reference in New Issue
Block a user