summaryrefslogtreecommitdiff
path: root/test/testautomation_audio.c
diff options
context:
space:
mode:
authorAndreas Schiffler <aschiffler@ferzkopp.net>2013-02-08 07:14:50 -0800
committerAndreas Schiffler <aschiffler@ferzkopp.net>2013-02-08 07:14:50 -0800
commitcd682b904b5d3d2778b341e36f0c4adfc92f8336 (patch)
tree1b525397b212648a6ff83d0d83010dcabee1e5e8 /test/testautomation_audio.c
parent9a9f81d65626d5efe10c203a676f6ee3879ab52a (diff)
downloadsdl-cd682b904b5d3d2778b341e36f0c4adfc92f8336.tar.gz
Add SDL_test test suite; add fuzzer test cases; fix fuzzer bug; fix compiler warnings
Diffstat (limited to 'test/testautomation_audio.c')
-rw-r--r--test/testautomation_audio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c
index 725c7d66c..c28486ff3 100644
--- a/test/testautomation_audio.c
+++ b/test/testautomation_audio.c
@@ -612,7 +612,7 @@ int audio_convertAudio()
*/
int audio_openCloseAudioDeviceConnected()
{
- int result;
+ int result = -1;
int i;
int count;
char *device;
@@ -641,7 +641,7 @@ int audio_openCloseAudioDeviceConnected()
/* Open device */
id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device);
- SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %i", id);
+ SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >1, got: %i", id);
if (id > 1) {
/* TODO: enable test code when function is available in SDL2 */
@@ -650,8 +650,8 @@ int audio_openCloseAudioDeviceConnected()
/* Get connected status */
result = SDL_AudioDeviceConnected(id);
SDLTest_AssertPass("Call to SDL_AudioDeviceConnected()");
- SDLTest_AssertCheck(result == 1, "Verify returned value; expected: 0; got: %i", result);
#endif
+ SDLTest_AssertCheck(result == 1, "Verify returned value; expected: 1; got: %i", result);
/* Close device again */
SDL_CloseAudioDevice(id);