test/testautomation.c
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 17 Aug 2016 21:04:50 +0200
changeset 10275 ba7dc3ebb81e
parent 9998 f67cf37e9cd4
permissions -rw-r--r--
Emscripten: Fixed opening previously closed joystick.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     1
/*
9998
f67cf37e9cd4 Updated copyright to 2016
Sam Lantinga <slouken@libsdl.org>
parents: 9619
diff changeset
     2
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     3
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     4
  This software is provided 'as-is', without any express or implied
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     5
  warranty.  In no event will the authors be held liable for any damages
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     6
  arising from the use of this software.
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     7
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     8
  Permission is granted to anyone to use this software for any purpose,
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
     9
  including commercial applications, and to alter it and redistribute it
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    10
  freely.
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    11
*/
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    12
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    13
#include <stdlib.h>
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    14
#include <stdio.h>
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    15
#include <time.h>
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    16
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    17
#include "SDL.h"
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    18
#include "SDL_test.h"
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    19
6769
b49778d885cd Added the automation test to the autoconf build system
Sam Lantinga <slouken@libsdl.org>
parents: 6763
diff changeset
    20
#include "testautomation_suites.h"
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    21
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    22
static SDLTest_CommonState *state;
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    23
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    24
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    25
static void
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    26
quit(int rc)
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    27
{
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    28
    SDLTest_CommonQuit(state);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    29
    exit(rc);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    30
}
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    31
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    32
int
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    33
main(int argc, char *argv[])
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    34
{
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    35
    int result;
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    36
    int testIterations = 1;
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    37
    Uint64 userExecKey = 0;
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    38
    char *userRunSeed = NULL;
6763
9cbd31a3450b Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    39
    char *filter = NULL;
6830
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
    40
    int i, done;
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
    41
    SDL_Event event;
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    42
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    43
    /* Initialize test framework */
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    44
    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    45
    if (!state) {
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    46
        return 1;
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    47
    }
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    48
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    49
    /* Parse commandline */
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    50
    for (i = 1; i < argc;) {
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    51
        int consumed;
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    52
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    53
        consumed = SDLTest_CommonArg(state, i);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    54
        if (consumed == 0) {
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    55
            consumed = -1;
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    56
            if (SDL_strcasecmp(argv[i], "--iterations") == 0) {
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    57
                if (argv[i + 1]) {
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    58
                    testIterations = SDL_atoi(argv[i + 1]);
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    59
                    if (testIterations < 1) testIterations = 1;
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    60
                    consumed = 2;
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    61
                }
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    62
            }
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    63
            else if (SDL_strcasecmp(argv[i], "--execKey") == 0) {
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    64
                if (argv[i + 1]) {
9260
039714172dc3 switch to use SDL_PRI* macros for long long formatting everywhere.
Edward Rudd <urkle@outoforder.cc>
parents: 8149
diff changeset
    65
                    SDL_sscanf(argv[i + 1], "%"SDL_PRIu64, (long long unsigned int *)&userExecKey);
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    66
                    consumed = 2;
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    67
                }
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    68
            }
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    69
            else if (SDL_strcasecmp(argv[i], "--seed") == 0) {
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    70
                if (argv[i + 1]) {
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    71
                    userRunSeed = SDL_strdup(argv[i + 1]);
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    72
                    consumed = 2;
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
    73
                }
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    74
            }
6763
9cbd31a3450b Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    75
            else if (SDL_strcasecmp(argv[i], "--filter") == 0) {
9cbd31a3450b Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    76
                if (argv[i + 1]) {
9cbd31a3450b Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    77
                    filter = SDL_strdup(argv[i + 1]);
9cbd31a3450b Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    78
                    consumed = 2;
9cbd31a3450b Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    79
                }
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    80
            }
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    81
        }
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    82
        if (consumed < 0) {
7639
9406b7dd2f2d Fix bug 2034: replace printf by SDL_Log in tests; update loopwave VS solution: copy missing dependency
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 7517
diff changeset
    83
            SDL_Log("Usage: %s %s [--iterations #] [--execKey #] [--seed string] [--filter suite_name|test_name]\n",
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    84
                    argv[0], SDLTest_CommonUsage(state));
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    85
            quit(1);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    86
        }
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    87
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    88
        i += consumed;
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    89
    }
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    90
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
    91
    /* Initialize common state */
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    92
    if (!SDLTest_CommonInit(state)) {
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    93
        quit(2);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    94
    }
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    95
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    96
    /* Create the windows, initialize the renderers */
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    97
    for (i = 0; i < state->num_windows; ++i) {
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    98
        SDL_Renderer *renderer = state->renderers[i];
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
    99
        SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   100
        SDL_RenderClear(renderer);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   101
    }
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   102
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   103
    /* Call Harness */
6772
5229a117ef97 Added audio test suite; minor code cleanups in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6771
diff changeset
   104
    result = SDLTest_RunSuites(testSuites, (const char *)userRunSeed, userExecKey, (const char *)filter, testIterations);
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
   105
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
   106
    /* Empty event queue */
6830
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   107
    done = 0;
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   108
    for (i=0; i<100; i++)  {
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   109
      while (SDL_PollEvent(&event)) {
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   110
        SDLTest_CommonEvent(state, &event, &done);
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   111
      }
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   112
      SDL_Delay(10);
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   113
    }
0cd3e2e9b2c5 Add tests to audio suite; update harness filter logic
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6813
diff changeset
   114
6757
9935f71c8c81 Fixes in harness and fuzzer test lib components; improve harness driver; add rect test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6756
diff changeset
   115
    /* Clean up */
7719
31b5f9ff36ca Christoph Mallon: Remove pointless if (x) before SDL_free(x)
Sam Lantinga <slouken@libsdl.org>
parents: 7639
diff changeset
   116
    SDL_free(userRunSeed);
31b5f9ff36ca Christoph Mallon: Remove pointless if (x) before SDL_free(x)
Sam Lantinga <slouken@libsdl.org>
parents: 7639
diff changeset
   117
    SDL_free(filter);
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
   118
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   119
    /* Shutdown everything */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 6830
diff changeset
   120
    quit(result);
6756
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   121
    return(result);
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   122
}
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   123
398073b195bb Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code
Andreas Schiffler <aschiffler@ferzkopp.net>
parents:
diff changeset
   124
/* vi: set ts=4 sw=4 expandtab: */