Пример #1
0
func main() {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	defer glfw.Terminate()

	gorgasm.Verbose = true

	if !glfw.Init() {
		panic("Can't init glfw!")
	}

	// Enable OpenGL ES 2.0.
	glfw.WindowHint(glfw.ClientApi, glfw.OpenglEsApi)
	glfw.WindowHint(glfw.ContextVersionMajor, 2)
	window, err := glfw.CreateWindow(testlib.Width, testlib.Height, "Gorgasm Test", nil, nil)
	if err != nil {
		panic(err)
	}

	gorgasm.Init(window)

	go prettytest.Run(new(testing.T), testlib.NewTestSuite())

	for !window.ShouldClose() {
		glfw.WaitEvents()
	}
}
Пример #2
0
func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())

	gorgasm.Verbose = true

	go prettytest.RunWithFormatter(
		t,
		testlib.NewTDDFormatter(),
		testlib.NewTestSuite(),
	)
}