test/testautomation_suites.h
author Jørgen P. Tjernø <jorgen@valvesoftware.com>
Tue, 12 Feb 2013 11:47:31 -0800
changeset 6866 e74a4b282450
parent 6839 2494f667555c
child 7134 09ee216e6a25
permissions -rw-r--r--
Don't clobber refcounting in SDL_Init. - Fixes bug 1712 by not overwriting SDL_SubsystemRefCount in SDL_Init. - Removes the SDL_initialized variable, and makes SDL_SubsystemRefCount the canonical source of truth for whether or not a subsystem has been initialized. - Refactors SDL_InitSubSystem and SDL_QuitSubSystem to use helper functions to manage refcount. - Adds automated tests for SDL_Init/Quit*. - Adds SDL_bits.h which contains SDL_MostSignificantBitIndex.
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
/**
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
     2
 * Reference to all test suites.
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
 */
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
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
#ifndef _testsuites_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
     7
#define _testsuites_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
     8
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
#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
    10
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
// Test collections
6772
5229a117ef97 Added audio test suite; minor code cleanups in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6769
diff changeset
    12
extern SDLTest_TestSuiteReference audioTestSuite;
6760
04dcce3081e6 Port clipboard and rwops test suites from GSOC code; minor updates to harness and fuzzer in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    13
extern SDLTest_TestSuiteReference clipboardTestSuite;
6800
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    14
extern SDLTest_TestSuiteReference eventsTestSuite;
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    15
extern SDLTest_TestSuiteReference keyboardTestSuite;
6866
e74a4b282450 Don't clobber refcounting in SDL_Init.
Jørgen P. Tjernø <jorgen@valvesoftware.com>
parents: 6839
diff changeset
    16
extern SDLTest_TestSuiteReference mainTestSuite;
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
    17
extern SDLTest_TestSuiteReference platformTestSuite;
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
    18
extern SDLTest_TestSuiteReference rectTestSuite;
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: 6760
diff changeset
    19
extern SDLTest_TestSuiteReference renderTestSuite;
6760
04dcce3081e6 Port clipboard and rwops test suites from GSOC code; minor updates to harness and fuzzer in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    20
extern SDLTest_TestSuiteReference rwopsTestSuite;
6773
5ebc5a9e35b4 Add surface test suite; minor improvements to render suite; refactor image saving into test lib compare function; fix for Haiku build
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6772
diff changeset
    21
extern SDLTest_TestSuiteReference surfaceTestSuite;
6800
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    22
extern SDLTest_TestSuiteReference syswmTestSuite;
6839
2494f667555c Add SDL_test test suite; add fuzzer test cases; fix fuzzer bug; fix compiler warnings
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6815
diff changeset
    23
extern SDLTest_TestSuiteReference sdltestTestSuite;
6800
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    24
extern SDLTest_TestSuiteReference videoTestSuite;
6801
f92e3d5f71a2 Add new test suite (mouse) with a few new tests
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6800
diff changeset
    25
extern SDLTest_TestSuiteReference mouseTestSuite;
6815
5fefa916e039 Added timer test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6801
diff changeset
    26
extern SDLTest_TestSuiteReference timerTestSuite;
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
    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
// All test suites
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
SDLTest_TestSuiteReference *testSuites[] =  {
6772
5229a117ef97 Added audio test suite; minor code cleanups in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6769
diff changeset
    30
	&audioTestSuite,
6760
04dcce3081e6 Port clipboard and rwops test suites from GSOC code; minor updates to harness and fuzzer in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    31
	&clipboardTestSuite,
6800
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    32
	&eventsTestSuite,
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    33
	&keyboardTestSuite,
6866
e74a4b282450 Don't clobber refcounting in SDL_Init.
Jørgen P. Tjernø <jorgen@valvesoftware.com>
parents: 6839
diff changeset
    34
	&mainTestSuite,
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
    35
	&platformTestSuite,
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
	&rectTestSuite,
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: 6760
diff changeset
    37
	&renderTestSuite,
6760
04dcce3081e6 Port clipboard and rwops test suites from GSOC code; minor updates to harness and fuzzer in test lib
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6757
diff changeset
    38
	&rwopsTestSuite,
6773
5ebc5a9e35b4 Add surface test suite; minor improvements to render suite; refactor image saving into test lib compare function; fix for Haiku build
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6772
diff changeset
    39
	&surfaceTestSuite,
6800
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    40
	&syswmTestSuite,
6839
2494f667555c Add SDL_test test suite; add fuzzer test cases; fix fuzzer bug; fix compiler warnings
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6815
diff changeset
    41
	&sdltestTestSuite,
6800
26c6795ec1a4 Add new test suites (events, keyboard, syswm, video) with a few new tests each
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6773
diff changeset
    42
	&videoTestSuite,
6801
f92e3d5f71a2 Add new test suite (mouse) with a few new tests
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6800
diff changeset
    43
	&mouseTestSuite,
6815
5fefa916e039 Added timer test suite
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 6801
diff changeset
    44
	&timerTestSuite,
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
    45
	NULL
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
};
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
#endif