libsdl-org / sdl2-compat

An SDL2 compatibility layer that uses SDL3 behind the scenes.
zlib License
80 stars 19 forks source link

testautomation: `video_setWindowCenteredOnDisplay` fails on Windows #207

Open madebr opened 3 months ago

madebr commented 3 months ago

Running testautomation --filter video_setWindowCenteredOnDisplay fails on Windows. It looks like all y is offset by 20.

Full test output ``` INFO: 08/06/24 21:04:51: ----- Test Case 22.24: 'video_setWindowCenteredOnDisplay' started INFO: 08/06/24 21:04:51: Test Description: 'Checks using SDL_WINDOWPOS_CENTERED_DISPLAY centers the window on a display' INFO: 08/06/24 21:04:51: Test Iteration 1: execKey 12597581167402608742 INFO: 08/06/24 21:04:51: Assert 'SDL_GetNumVideoDisplays()': Passed INFO: 08/06/24 21:04:51: Assert 'Validate result (current: 1, expected >= 1)': Passed INFO: 08/06/24 21:04:51: Assert 'SDL_GetDisplayBounds()': Passed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'SDL_GetDisplayBounds()': Passed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_CreateWindow('Title',805240832,805240832,737,416,SHOWN)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate that returned window struct is not NULL': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 737, expected: 737)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 416, expected: 416)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 591, expected: 591)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 312, expected: 332)': Failed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 1920, expected: 1920)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 1080, expected: 1080)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate y (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 737, expected: 737)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 416, expected: 416)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 591, expected: 591)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 312, expected: 332)': Failed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 737, expected: 737)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 416, expected: 416)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 591, expected: 591)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 312, expected: 332)': Failed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_DestroyWindow()': Passed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_CreateWindow('Title',805240832,805240832,650,434,SHOWN)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate that returned window struct is not NULL': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 650, expected: 650)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 434, expected: 434)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 635, expected: 635)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 303, expected: 323)': Failed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 1920, expected: 1920)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 1080, expected: 1080)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate y (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 650, expected: 650)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 434, expected: 434)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 635, expected: 635)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 303, expected: 323)': Failed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 650, expected: 650)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 434, expected: 434)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 635, expected: 635)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 303, expected: 323)': Failed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_DestroyWindow()': Passed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_CreateWindow('Title',805240832,805240832,731,594,SHOWN)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate that returned window struct is not NULL': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 731, expected: 731)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 594, expected: 594)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 594, expected: 594)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 223, expected: 243)': Failed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 1920, expected: 1920)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 1080, expected: 1080)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate y (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 731, expected: 731)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 594, expected: 594)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 594, expected: 594)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 223, expected: 243)': Failed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 731, expected: 731)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 594, expected: 594)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 594, expected: 594)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 223, expected: 243)': Failed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_DestroyWindow()': Passed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_CreateWindow('Title',805240832,805240832,741,513,SHOWN)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate that returned window struct is not NULL': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 741, expected: 741)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 513, expected: 513)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 589, expected: 589)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 263, expected: 283)': Failed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 1920, expected: 1920)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 1080, expected: 1080)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate y (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Verify return value; expected: 0, got: 0': Passed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 741, expected: 741)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 513, expected: 513)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 589, expected: 589)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 263, expected: 283)': Failed INFO: 08/06/24 21:04:51: Assert 'Validate display index (current: 0, expected: 0)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate width (current: 741, expected: 741)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate height (current: 513, expected: 513)': Passed INFO: 08/06/24 21:04:51: Assert 'Validate x (current: 589, expected: 589)': Passed ERROR: 08/06/24 21:04:51: Assert 'Validate y (current: 263, expected: 283)': Failed INFO: 08/06/24 21:04:51: Assert 'Call to SDL_DestroyWindow()': Passed INFO: 08/06/24 21:04:51: Fuzzer invocations: 8 ERROR: 08/06/24 21:04:51: Assert Summary: Total=106 Passed=94 Failed=12 INFO: 08/06/24 21:04:51: Total Test runtime: 0.2 sec ERROR: 08/06/24 21:04:51: >>> Test 'video_setWindowCenteredOnDisplay': Failed ```
slouken commented 3 months ago

Is this on your system, or on CI?

madebr commented 3 months ago

Is this on your system, or on CI?

This is on my system, when running testautomation manually. CTest always uses dummy audio/video driver. Running them manually uses the native windows video driver.