Atlas - SDL_visualtest_variators.h
Home / ext / SDL2 / visualtest / include Lines: 1 | Size: 1861 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]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 8#include "SDL_visualtest_exhaustive_variator.h" 9#include "SDL_visualtest_random_variator.h" 10 11#ifndef SDL_visualtest_variators_h_ 12#define SDL_visualtest_variators_h_ 13 14/* Set up for C function definitions, even when using C++ */ 15#ifdef __cplusplus 16extern "C" { 17#endif 18 19/** 20 * Struct that acts like a wrapper around the different types of variators 21 * available. 22 */ 23typedef struct SDLVisualTest_Variator 24{ 25 /*! Type of the variator */ 26 SDLVisualTest_VariatorType type; 27 /*! union object that stores the variator */ 28 union 29 { 30 SDLVisualTest_ExhaustiveVariator exhaustive; 31 SDLVisualTest_RandomVariator random; 32 } data; 33} SDLVisualTest_Variator; 34 35/** 36 * Initializes the variator object pointed to by \c variator of type \c type 37 * with information from the config object pointed to by \c config. 38 * 39 * \return 1 on success, 0 on failure 40 */ 41int SDLVisualTest_InitVariator(SDLVisualTest_Variator* variator, 42 SDLVisualTest_SUTConfig* config, 43 SDLVisualTest_VariatorType type, 44 Uint64 seed); 45 46/** 47 * Gets the next variation using the variator. 48 * 49 * \return The arguments string representing the variation on success, and 50 * NULL on failure. The pointer returned should not be freed. 51 */ 52char* SDLVisualTest_GetNextVariation(SDLVisualTest_Variator* variator); 53 54/** 55 * Frees any resources associated with the variator. 56 */ 57void SDLVisualTest_FreeVariator(SDLVisualTest_Variator* variator); 58 59/* Ends C function definitions when using C++ */ 60#ifdef __cplusplus 61} 62#endif 63 64#endif /* SDL_visualtest_variators_h_ */ 65 66/* vi: set ts=4 sw=4 expandtab: */ 67[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.