🛠️🐜 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.

66 lines
1.8 KiB

  1. /* See COPYING.txt for the full license governing this code. */
  2. /**
  3. * \file SDL_visualtest_variators.h
  4. *
  5. * Header for all the variators that vary input parameters to a SUT application.
  6. */
  7. #include "SDL_visualtest_exhaustive_variator.h"
  8. #include "SDL_visualtest_random_variator.h"
  9. #ifndef SDL_visualtest_variators_h_
  10. #define SDL_visualtest_variators_h_
  11. /* Set up for C function definitions, even when using C++ */
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /**
  16. * Struct that acts like a wrapper around the different types of variators
  17. * available.
  18. */
  19. typedef struct SDLVisualTest_Variator
  20. {
  21. /*! Type of the variator */
  22. SDLVisualTest_VariatorType type;
  23. /*! union object that stores the variator */
  24. union
  25. {
  26. SDLVisualTest_ExhaustiveVariator exhaustive;
  27. SDLVisualTest_RandomVariator random;
  28. } data;
  29. } SDLVisualTest_Variator;
  30. /**
  31. * Initializes the variator object pointed to by \c variator of type \c type
  32. * with information from the config object pointed to by \c config.
  33. *
  34. * \return 1 on success, 0 on failure
  35. */
  36. int SDLVisualTest_InitVariator(SDLVisualTest_Variator* variator,
  37. SDLVisualTest_SUTConfig* config,
  38. SDLVisualTest_VariatorType type,
  39. Uint64 seed);
  40. /**
  41. * Gets the next variation using the variator.
  42. *
  43. * \return The arguments string representing the variation on success, and
  44. * NULL on failure. The pointer returned should not be freed.
  45. */
  46. char* SDLVisualTest_GetNextVariation(SDLVisualTest_Variator* variator);
  47. /**
  48. * Frees any resources associated with the variator.
  49. */
  50. void SDLVisualTest_FreeVariator(SDLVisualTest_Variator* variator);
  51. /* Ends C function definitions when using C++ */
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif /* SDL_visualtest_variators_h_ */
  56. /* vi: set ts=4 sw=4 expandtab: */