Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially resolve #257: video_test #270

Merged
merged 3 commits into from
Aug 19, 2023
Merged

Partially resolve #257: video_test #270

merged 3 commits into from
Aug 19, 2023

Commits on Aug 19, 2023

  1. video_test: Don't check error unless a function failed

    Helps: py-sdl#257
    Signed-off-by: Simon McVittie <smcv@debian.org>
    smcv committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    e38c4ab View commit details
    Browse the repository at this point in the history
  2. video_test: Use _check_error_msg() a bit more often

    Signed-off-by: Simon McVittie <smcv@debian.org>
    smcv committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    fd67df5 View commit details
    Browse the repository at this point in the history
  3. video_test: Mitigate unsuitability of SDL_GetError() for detecting fa…

    …ilure
    
    SDL_GetError() is like errno: it's documented not to be suitable for
    detecting failure, only for getting more details if failure was already
    detected (its result is unspecified on success, because a successful
    API call might have been implemented by doing something that failed,
    detecting that, and falling back to doing something different).
    However, some functions in SDL2 return void, so we have no other way
    to tell whether they have failed (they do return a result in SDL3).
    
    To make it less likely that upgrading SDL2 will make these tests regress,
    clear the error indicator immediately before calling the function under
    test. It is still not guaranteed to be empty on success, but at least
    this way we make sure it doesn't already contain an error message from
    a previous function call.
    
    Helps: py-sdl#257
    Signed-off-by: Simon McVittie <smcv@debian.org>
    smcv committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    915f7fa View commit details
    Browse the repository at this point in the history