MCPcopy
hub / github.com/EngoEngine/engo / TestRunHeadless

Function TestRunHeadless

engo_test.go:207–222  ·  view source on GitHub ↗

This test tests running headless but also letting it go into the runloop

(t *testing.T)

Source from the content-addressed store, hash-verified

205
206// This test tests running headless but also letting it go into the runloop
207func TestRunHeadless(t *testing.T) {
208 testChan := make(chan struct{})
209 go func() {
210 Run(RunOptions{
211 HeadlessMode: true,
212 OverrideCloseAction: true,
213 }, &testRunScene{1})
214 testChan <- struct{}{}
215 }()
216 select {
217 case <-testChan:
218 return
219 case <-time.After(1 * time.Second):
220 t.Error("Timed out while waiting for Headless Run to return from loop. Exit wasn't called within 1 second.")
221 }
222}
223
224func TestOverrideCloseAction(t *testing.T) {
225 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 2

RunFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected