Esempio 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)
}
Esempio n. 2
0
func main() {
	testing.Main(__regexp__.MatchString, tests)
	testing.RunBenchmarks(__regexp__.MatchString, benchmarks)
}
Esempio n. 3
0
func main() {
	testing.Main(tests)
	testing.RunBenchmarks(benchmarks)
}