Starter project for SDL2.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021
  1. #ifndef SDL_JOYSTICK_MOCK_H
  2. #define SDL_JOYSTICK_MOCK_H
  3. #include "../src/packages/test/IZ_test.h"
  4. typedef struct _SDL_Joystick {} SDL_Joystick;
  5. mock(SDL_JoystickOpen) SDL_Joystick* SDL_JoystickOpen(int device_index) {
  6. static SDL_Joystick joystick;
  7. mock_return(SDL_JoystickOpen) &joystick;
  8. }
  9. mock(SDL_NumJoysticks) int SDL_NumJoysticks(void) {
  10. mock_return(SDL_NumJoysticks) 1;
  11. }
  12. mock(SDL_JoystickInstanceID) int SDL_JoystickInstanceID(SDL_Joystick* joystick) {
  13. mock_return(SDL_JoystickInstanceID) 0;
  14. }
  15. #endif