MCPcopy Index your code
hub / github.com/EngoEngine/engo / TestSetTitleHeadless

Function TestSetTitleHeadless

engo_test.go:314–325  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

312}
313
314func TestSetTitleHeadless(t *testing.T) {
315 exp := "Title set to: test title\n"
316 Run(RunOptions{
317 HeadlessMode: true,
318 NoRun: true,
319 }, &testScene{})
320 var buf bytes.Buffer
321 log.SetOutput(&buf)
322 if SetTitle("test title"); !strings.HasSuffix(buf.String(), exp) {
323 t.Errorf("Did not properly log title set. Got: %v, wanted: %v", buf.String(), exp)
324 }
325}
326
327func TestGetTitle(t *testing.T) {
328 Run(RunOptions{

Callers

nothing calls this directly

Calls 2

RunFunction · 0.85
SetTitleFunction · 0.70

Tested by

no test coverage detected