Atlas - SDL_visualtest_exhaustive_variator.h

Home / ext / SDL2 / visualtest / include Lines: 1 | Size: 2080 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_exhaustive_variator.h 4 * 5 * Header for the exhaustive variator. 6 */ 7 8#include "SDL_visualtest_harness_argparser.h" 9#include "SDL_visualtest_variator_common.h" 10 11#ifndef SDL_visualtest_exhaustive_variator_h_ 12#define SDL_visualtest_exhaustive_variator_h_ 13 14/* Set up for C function definitions, even when using C++ */ 15#ifdef __cplusplus 16extern "C" { 17#endif 18 19/** 20 * Struct for the variator that exhaustively iterates through all variations of 21 * command line arguments to the SUT. 22 */ 23typedef struct SDLVisualTest_ExhaustiveVariator 24{ 25 /*! The current variation. */ 26 SDLVisualTest_Variation variation; 27 /*! Configuration object for the SUT that the variator is running for. */ 28 SDLVisualTest_SUTConfig config; 29 /*! Buffer to store the arguments string built from the variation */ 30 char buffer[MAX_SUT_ARGS_LEN]; 31} SDLVisualTest_ExhaustiveVariator; 32 33/** 34 * Initializes the variator. 35 * 36 * \return 1 on success, 0 on failure 37 */ 38int SDLVisualTest_InitExhaustiveVariator(SDLVisualTest_ExhaustiveVariator* variator, 39 SDLVisualTest_SUTConfig* config); 40 41/** 42 * Gets the arguments string for the next variation using the variator and updates 43 * the variator's current variation object to the next variation. 44 * 45 * \return The arguments string representing the next variation on success, and 46 * NULL on failure or if we have iterated through all possible variations. 47 * In the latter case subsequent calls will start the variations again from 48 * the very beginning. The pointer returned should not be freed. 49 */ 50char* SDLVisualTest_GetNextExhaustiveVariation(SDLVisualTest_ExhaustiveVariator* variator); 51 52/** 53 * Frees any resources associated with the variator. 54 */ 55void SDLVisualTest_FreeExhaustiveVariator(SDLVisualTest_ExhaustiveVariator* variator); 56 57/* Ends C function definitions when using C++ */ 58#ifdef __cplusplus 59} 60#endif 61 62#endif /* SDL_visualtest_exhaustive_variator_h_ */ 63 64/* vi: set ts=4 sw=4 expandtab: */ 65
[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.