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)
| 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 |
| 39 | func 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 | |
| 66 | func TestSetScaleOnResize(t *testing.T) { |
| 67 | Run(RunOptions{ |