@@ -64,16 +64,16 @@ func TestFullscreenToggle(t *testing.T) {
6464 gam := New ()
6565 toggle := entities .NewFullscreenToggle (gam )
6666 toggle .OnUpdate (toggle )
67- if toggle .On {
68- t .Error ("toggle.On = true , want false " )
67+ if ! toggle .On {
68+ t .Error ("toggle.On = false , want true " )
6969 }
70- toggle .On = true
70+ toggle .On = false
7171 toggle .OnClick (toggle )
72- if gam .FullscreenEnabled () {
73- t .Error ("FullscreenEnabled() = true , want false " )
72+ if ! gam .FullscreenEnabled () {
73+ t .Error ("FullscreenEnabled() = false , want true " )
7474 }
75- if got := gam .FullscreenReq (); got != int32 (vgame .FullscreenReqExit ) {
76- t .Errorf ("FullscreenReq() = %v, want exit " , got )
75+ if got := gam .FullscreenReq (); got != int32 (vgame .FullscreenReqEnter ) {
76+ t .Errorf ("FullscreenReq() = %v, want enter " , got )
7777 }
7878}
7979
@@ -200,27 +200,23 @@ func TestAdjustLvlScaleAt(t *testing.T) {
200200 }
201201}
202202
203- // reqs fullscreen and wakelock by default.
204- func TestDefaultFullscreenAndWakelockReqs (t * testing.T ) {
203+ // starts windowed and reqs wakelock by default.
204+ func TestDefaults (t * testing.T ) {
205205 gam := New ()
206206 gam .Router .Update = func (* Eng ) vgame.Status { return vgame .Pause }
207207 gam .Update ()
208- if ! gam .FullscreenEnabled () {
209- t .Error ("FullscreenEnabled() = false , want true " )
208+ if gam .FullscreenEnabled () {
209+ t .Error ("FullscreenEnabled() = true , want false " )
210210 }
211- if got := gam .FullscreenReq (); got != int32 (vgame .FullscreenReqEnter ) {
212- t .Errorf ("FullscreenReq() = %v, want enter " , got )
211+ if got := gam .FullscreenReq (); got != int32 (vgame .FullscreenReqNone ) {
212+ t .Errorf ("FullscreenReq() = %v, want none " , got )
213213 }
214214 if got := gam .ReqWakelockFlag (); got != 1 {
215215 t .Errorf ("ReqWakelockFlag() = %v, want 1" , got )
216216 }
217217
218- gam .ReqFullscreen (vgame .FullscreenReqExit )
219218 gam .DisableWakelock (true )
220219 gam .Update ()
221- if got := gam .FullscreenReq (); got != int32 (vgame .FullscreenReqExit ) {
222- t .Errorf ("FullscreenReq() = %v, want exit" , got )
223- }
224220 if got := gam .ReqWakelockFlag (); got != 0 {
225221 t .Errorf ("ReqWakelockFlag() = %v, want 0" , got )
226222 }
0 commit comments