2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SDL_joystick.mock.h 929 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef SDL_JOYSTICK_MOCK_H
  2. #define SDL_JOYSTICK_MOCK_H
  3. #include <bdd-for-c-mocks.h>
  4. #include <SDL_joystick.h>
  5. #include "../../../src/packages/common/IZ_common.h"
  6. #define MOCK_OPEN_JOYSTICKS 1
  7. mock(SDL_JoystickOpen) SDL_Joystick* SDL_JoystickOpen(i32 device_index) {
  8. static void* joystick = (void*) 1;
  9. mock_return(SDL_JoystickOpen) (SDL_Joystick*) &joystick;
  10. }
  11. mock(SDL_NumJoysticks) i32 SDL_NumJoysticks(void) {
  12. mock_return(SDL_NumJoysticks) MOCK_OPEN_JOYSTICKS;
  13. }
  14. mock(SDL_JoystickInstanceID) i32 SDL_JoystickInstanceID(SDL_Joystick* joystick) {
  15. mock_return(SDL_JoystickInstanceID) 0;
  16. }
  17. mock(SDL_JoystickClose) void SDL_JoystickClose(SDL_Joystick* _joystick) {
  18. mock_return(SDL_JoystickClose);
  19. }
  20. mock(SDL_JoystickGetGUID) SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick* joystick) {
  21. mock_return(SDL_JoystickGetGUID) (SDL_JoystickGUID) {
  22. .data = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }
  23. };
  24. }
  25. #endif