示例#1
0
func TestSpeed(t *testing.T) {
	tools.TimeClear()
	c := NewCompiler()
	c.Allow("fmt")
	n := 10
	for i := 0; i < n; i++ {
		runFileTest(t, c, "testdata/test1.go", true, "", "test1.go")
	}
}
示例#2
0
func TestSpeedString(t *testing.T) {
	tools.TimeClear()
	c := NewCompiler()
	c.Allow("fmt")
	n := 10
	s := "package main\nimport \"fmt\"\nfunc main() { fmt.Print(\"teststring\") }\n"
	for i := 0; i < n; i++ {
		runStringTest(t, c, s, true, "", "teststring")
	}
}