Starter project for SDL2.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

21 rader
506 B

  1. #ifndef IZ_MOCK_H
  2. #define IZ_MOCK_H
  3. #define mock_call_count_t unsigned char
  4. #define mock(X) static mock_call_count_t actual_##X = 0;
  5. #define mock_return(X) actual_##X += 1; return
  6. #define mock_reset(X) actual_##X = 0
  7. #define mock_get_actual_calls(X) (mock_call_count_t) actual_##X
  8. #define mock_set_expected_calls(X, Y) static const mock_call_count_t expected_##X = Y
  9. #define mock_get_expected_calls(X) (mock_call_count_t) expected_##X
  10. #define mock_is_called(X) mock_get_actual_calls(X) > 0
  11. #endif