test/testautomation_audio.c
changeset 6839 2494f667555c
parent 6830 0cd3e2e9b2c5
child 6897 865811c9f372
--- a/test/testautomation_audio.c	Fri Feb 08 01:12:48 2013 -0800
+++ b/test/testautomation_audio.c	Fri Feb 08 07:14:50 2013 -0800
@@ -612,7 +612,7 @@
  */
 int audio_openCloseAudioDeviceConnected()
 {
-   int result;
+   int result = -1;
    int i;
    int count;
    char *device;   
@@ -641,7 +641,7 @@
        /* 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 @@
          /* 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);