visualtest/include/SDL_visualtest_exhaustive_variator.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 23 Sep 2017 12:38:47 -0700
changeset 11543 53b03749a7ff
parent 11382 2c50e79b19e0
permissions -rw-r--r--
Fixed bug 3842 - fix SDL_thread.h for emx

Ozkan Sezer

EMX declares _beginthread() / _endthread() in stdlib.h, not process.h.
The attached patch updates the OS/2 case of SDL_thread.h for it. (It
also tidies the unreadable whitespace in win32 case.)
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
slouken@11382
    11
#ifndef SDL_visualtest_exhaustive_variator_h_
slouken@11382
    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
slouken@11382
    62
#endif /* SDL_visualtest_exhaustive_variator_h_ */
slouken@11382
    63
slouken@11382
    64
/* vi: set ts=4 sw=4 expandtab: */