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

Function TestSetFPSLimit

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

Source from the content-addressed store, hash-verified

127}
128
129func TestSetFPSLimit(t *testing.T) {
130 Run(RunOptions{
131 HeadlessMode: true,
132 NoRun: true,
133 }, &testScene{})
134 SetFPSLimit(5)
135 if opts.FPSLimit != 5 {
136 t.Error("SetFPSLimit didn't set properly.")
137 }
138
139 expected := "FPS Limit out of bounds. Requires > 0"
140 if err := SetFPSLimit(-5); err == nil {
141 t.Error("Error wasn't recieved when SetFPSLimit was set to a negative number.")
142 } else if err.Error() != expected {
143 t.Errorf("Wrong error recieved when SetFPSLimit was set to a negative number. want %v, got %v", expected, err.Error())
144 }
145}
146
147func TestRunNegativeMSAAPanic(t *testing.T) {
148 defer func() {

Callers

nothing calls this directly

Calls 3

RunFunction · 0.85
SetFPSLimitFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected