You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
363 B

package args
import (
"testing"
"go-common/app/tool/gengo/types"
)
func TestInputIncludes(t *testing.T) {
a := &GeneratorArgs{
InputDirs: []string{"a/b/..."},
}
if !a.InputIncludes(&types.Package{Path: "a/b/c"}) {
t.Errorf("Expected /... syntax to work")
}
if a.InputIncludes(&types.Package{Path: "a/c/b"}) {
t.Errorf("Expected correctness")
}
}