Exemplo n.º 1
0
func main() {
	flag.Parse()
	b := komoku.Benchmarks()
	if len(os.Args) == 1 {
		// No arguments supplied, so simply print the available benchmarks.
		bn := ""
		for _, n := range b {
			bn += n.Name + " "
		}
		fmt.Println("benchmarks:")
		fmt.Println(bn)
		return
	}
	matchAlways := func(pat, str string) (bool, os.Error) {
		return regexp.MatchString(pat, str)
	}
	testing.RunBenchmarks(matchAlways, b)
}
Exemplo n.º 2
0
func main() {
	testing.Main(__regexp__.MatchString, tests)
	testing.RunBenchmarks(__regexp__.MatchString, benchmarks)
}
Exemplo n.º 3
0
func main() {
	testing.Main(tests)
	testing.RunBenchmarks(benchmarks)
}