// GenerateTests generates table-driven tests for the function and method
// signatures defined in the target source path file(s). The source path
// parameter can be either a Go source file or directory containing Go files.

GenerateTests generates table-driven tests for the function and method
signatures defined in the target source path file(s). The source path
parameter can be either a Go source file or directory containing Go files.
// GenerateTests generates table - driven tests for the function and method // signatures defined in the target source path file ( s ) . The source path // parameter can be either a Go source file or directory containing Go files .
func GenerateTests(srcPath string, opt *Options) ([]*GeneratedTest, error) {
	if opt == nil {
		opt = &Options{}
	}
	srcFiles, err := input.Files(srcPath)
	if err != nil {
		return nil, fmt.Errorf("input.Files: %v", err)
	}
	files, err := input.Files(path.Dir(srcPath))
	if err != nil {
		return nil, fmt.Errorf("input.Files: %v", err)
	}
	if opt.Importer == nil || opt.Importer() == nil {
		opt.Importer = importer.Default
	}
	return parallelize(srcFiles, files, opt)
}
func GenerateTests ( srcPath string , opt * Options ) ( [ ] * GeneratedTest , error ) { if opt == nil { opt = & Options { } } srcFiles , err := input . Files ( srcPath ) if err != nil { return nil , fmt . Errorf ( " " , err ) } files , err := input . Files ( path . Dir ( srcPath ) ) if err != nil { return nil , fmt . Errorf ( " " , err ) } if opt . Importer == nil || opt . Importer ( ) == nil { opt . Importer = importer . Default } return parallelize ( srcFiles , files , opt ) }
GenerateTests generates table-driven tests for the function and method
signatures defined in the target source path file(s).
GenerateTests generates table - driven tests for the function and method signatures defined in the target source path file ( s ) .