visualtest/include/SDL_visualtest_variators.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_variators.h
icculus@7924
     4
 *
icculus@7924
     5
 * Header for all the variators that vary input parameters to a SUT application.
icculus@7924
     6
 */
icculus@7924
     7
icculus@7924
     8
#include "SDL_visualtest_exhaustive_variator.h"
icculus@7924
     9
#include "SDL_visualtest_random_variator.h"
icculus@7924
    10
slouken@11382
    11
#ifndef SDL_visualtest_variators_h_
slouken@11382
    12
#define SDL_visualtest_variators_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 that acts like a wrapper around the different types of variators
icculus@7924
    21
 * available.
icculus@7924
    22
 */
icculus@7924
    23
typedef struct SDLVisualTest_Variator
icculus@7924
    24
{
icculus@7924
    25
    /*! Type of the variator */
icculus@7924
    26
    SDLVisualTest_VariatorType type;
icculus@7924
    27
    /*! union object that stores the variator */
icculus@7924
    28
    union
icculus@7924
    29
    {
icculus@7924
    30
        SDLVisualTest_ExhaustiveVariator exhaustive;
icculus@7924
    31
        SDLVisualTest_RandomVariator random;
icculus@7924
    32
    } data;
icculus@7924
    33
} SDLVisualTest_Variator;
icculus@7924
    34
icculus@7924
    35
/**
icculus@7924
    36
 * Initializes the variator object pointed to by \c variator of type \c type
icculus@7924
    37
 * with information from the config object pointed to by \c config.
icculus@7924
    38
 *
icculus@7924
    39
 * \return 1 on success, 0 on failure
icculus@7924
    40
 */
icculus@7924
    41
int SDLVisualTest_InitVariator(SDLVisualTest_Variator* variator,
icculus@7924
    42
                               SDLVisualTest_SUTConfig* config,
icculus@7924
    43
                               SDLVisualTest_VariatorType type,
icculus@7924
    44
                               Uint64 seed);
icculus@7924
    45
icculus@7924
    46
/**
icculus@7924
    47
 * Gets the next variation using the variator.
icculus@7924
    48
 *
icculus@7924
    49
 * \return The arguments string representing the variation on success, and
icculus@7924
    50
 *         NULL on failure. The pointer returned should not be freed.
icculus@7924
    51
 */
icculus@7924
    52
char* SDLVisualTest_GetNextVariation(SDLVisualTest_Variator* variator);
icculus@7924
    53
icculus@7924
    54
/**
icculus@7924
    55
 * Frees any resources associated with the variator.
icculus@7924
    56
 */
icculus@7924
    57
void SDLVisualTest_FreeVariator(SDLVisualTest_Variator* variator);
icculus@7924
    58
icculus@7924
    59
/* Ends C function definitions when using C++ */
icculus@7924
    60
#ifdef __cplusplus
icculus@7924
    61
}
icculus@7924
    62
#endif
icculus@7924
    63
slouken@11382
    64
#endif /* SDL_visualtest_variators_h_ */
slouken@11382
    65
slouken@11382
    66
/* vi: set ts=4 sw=4 expandtab: */