visualtest/include/SDL_visualtest_exhaustive_variator.h
author David Ludwig <dludwig@pobox.com>
Wed, 25 Dec 2013 21:39:48 -0500
changeset 8563 c0e68f3b6bbb
parent 7924 fcb86d323770
child 11382 2c50e79b19e0
permissions -rw-r--r--
WinRT: compiled the d3d11 renderer's shaders into SDL itself

Previously, the shaders would get compiled separately, the output of which would need to be packaged into the app. This change should make SDL's dll be the only binary needed to include SDL in a WinRT app.
icculus@7924
     1
/* See COPYING.txt for the full license governing this code. */
icculus@7924
     2
/**
icculus@7924
     3
 * \file SDL_visualtest_exhaustive_variator.h
icculus@7924
     4
 *
icculus@7924
     5
 * Header for the exhaustive variator.
icculus@7924
     6
 */
icculus@7924
     7
icculus@7924
     8
#include "SDL_visualtest_harness_argparser.h"
icculus@7924
     9
#include "SDL_visualtest_variator_common.h"
icculus@7924
    10
icculus@7924
    11
#ifndef _SDL_visualtest_exhaustive_variator_h
icculus@7924
    12
#define _SDL_visualtest_exhaustive_variator_h
icculus@7924
    13
icculus@7924
    14
/* Set up for C function definitions, even when using C++ */
icculus@7924
    15
#ifdef __cplusplus
icculus@7924
    16
extern "C" {
icculus@7924
    17
#endif
icculus@7924
    18
icculus@7924
    19
/**
icculus@7924
    20
 * Struct for the variator that exhaustively iterates through all variations of
icculus@7924
    21
 * command line arguments to the SUT.
icculus@7924
    22
 */
icculus@7924
    23
typedef struct SDLVisualTest_ExhaustiveVariator
icculus@7924
    24
{
icculus@7924
    25
    /*! The current variation. */
icculus@7924
    26
    SDLVisualTest_Variation variation;
icculus@7924
    27
    /*! Configuration object for the SUT that the variator is running for. */
icculus@7924
    28
    SDLVisualTest_SUTConfig config;
icculus@7924
    29
    /*! Buffer to store the arguments string built from the variation */
icculus@7924
    30
    char buffer[MAX_SUT_ARGS_LEN];
icculus@7924
    31
} SDLVisualTest_ExhaustiveVariator;
icculus@7924
    32
icculus@7924
    33
/**
icculus@7924
    34
 * Initializes the variator.
icculus@7924
    35
 *
icculus@7924
    36
 * \return 1 on success, 0 on failure
icculus@7924
    37
 */
icculus@7924
    38
int SDLVisualTest_InitExhaustiveVariator(SDLVisualTest_ExhaustiveVariator* variator,
icculus@7924
    39
                                         SDLVisualTest_SUTConfig* config);
icculus@7924
    40
icculus@7924
    41
/**
icculus@7924
    42
 * Gets the arguments string for the next variation using the variator and updates
icculus@7924
    43
 * the variator's current variation object to the next variation.
icculus@7924
    44
 *
icculus@7924
    45
 * \return The arguments string representing the next variation on success, and
icculus@7924
    46
 *         NULL on failure or if we have iterated through all possible variations.
icculus@7924
    47
 *         In the latter case subsequent calls will start the variations again from
icculus@7924
    48
 *         the very beginning. The pointer returned should not be freed.
icculus@7924
    49
 */
icculus@7924
    50
char* SDLVisualTest_GetNextExhaustiveVariation(SDLVisualTest_ExhaustiveVariator* variator);
icculus@7924
    51
icculus@7924
    52
/**
icculus@7924
    53
 * Frees any resources associated with the variator.
icculus@7924
    54
 */
icculus@7924
    55
void SDLVisualTest_FreeExhaustiveVariator(SDLVisualTest_ExhaustiveVariator* variator);
icculus@7924
    56
icculus@7924
    57
/* Ends C function definitions when using C++ */
icculus@7924
    58
#ifdef __cplusplus
icculus@7924
    59
}
icculus@7924
    60
#endif
icculus@7924
    61
icculus@7924
    62
#endif /* _SDL_visualtest_exhaustive_variator_h */