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

Function TestRunHeadlessNoRunDefaults

engo_test.go:39–64  ·  view source on GitHub ↗

The tests for engo.go all have to use the headless option. Non-headless stuff is not testable via the cl only, and those are taken care of by building the demos via Travis CI

(t *testing.T)

Source from the content-addressed store, hash-verified

37// The tests for engo.go all have to use the headless option. Non-headless stuff is not
38// testable via the cl only, and those are taken care of by building the demos via Travis CI
39func TestRunHeadlessNoRunDefaults(t *testing.T) {
40 Run(RunOptions{
41 NoRun: true,
42 HeadlessMode: true,
43 }, &testScene{})
44
45 if opts.FPSLimit != 60 {
46 t.Error("FPSLimit was not defaulted to 60")
47 }
48
49 if opts.MSAA != 1 {
50 t.Error("MSAA was not defaulted to 1")
51 }
52
53 if opts.AssetsRoot != "assets" {
54 t.Error("AssetsRoot was not defaulted to assets")
55 }
56
57 if opts.Width != 800 {
58 t.Error("Width was not defaulted to 800")
59 }
60
61 if opts.Height != 800 {
62 t.Error("Height was not defaulted to 800")
63 }
64}
65
66func TestSetScaleOnResize(t *testing.T) {
67 Run(RunOptions{

Callers

nothing calls this directly

Calls 2

RunFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected