🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

61 lines
1.7 KiB

  1. /* See COPYING.txt for the full license governing this code. */
  2. /**
  3. * \file SDL_visualtest_random_variator.h
  4. *
  5. * Header for the random variator.
  6. */
  7. #include "SDL_visualtest_harness_argparser.h"
  8. #include "SDL_visualtest_variator_common.h"
  9. #ifndef SDL_visualtest_random_variator_h_
  10. #define SDL_visualtest_random_variator_h_
  11. /* Set up for C function definitions, even when using C++ */
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /**
  16. * Struct for the variator that randomly generates variations of command line
  17. * arguments to the SUT.
  18. */
  19. typedef struct SDLVisualTest_RandomVariator
  20. {
  21. /*! The current variation. */
  22. SDLVisualTest_Variation variation;
  23. /*! Configuration object for the SUT that the variator is running for. */
  24. SDLVisualTest_SUTConfig config;
  25. /*! Buffer to store the arguments string built from the variation */
  26. char buffer[MAX_SUT_ARGS_LEN];
  27. } SDLVisualTest_RandomVariator;
  28. /**
  29. * Initializes the variator.
  30. *
  31. * \return 1 on success, 0 on failure
  32. */
  33. int SDLVisualTest_InitRandomVariator(SDLVisualTest_RandomVariator* variator,
  34. SDLVisualTest_SUTConfig* config, Uint64 seed);
  35. /**
  36. * Generates a new random variation.
  37. *
  38. * \return The arguments string representing the random variation on success, and
  39. * NULL on failure. The pointer returned should not be freed.
  40. */
  41. char* SDLVisualTest_GetNextRandomVariation(SDLVisualTest_RandomVariator* variator);
  42. /**
  43. * Frees any resources associated with the variator.
  44. */
  45. void SDLVisualTest_FreeRandomVariator(SDLVisualTest_RandomVariator* variator);
  46. /* Ends C function definitions when using C++ */
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* SDL_visualtest_random_variator_h_ */
  51. /* vi: set ts=4 sw=4 expandtab: */