test/automated/testsdl.c
branchgsoc2009_unit_tests
changeset 3756 427f059bc814
parent 3753 5b48a529fd8a
     1.1 --- a/test/automated/testsdl.c	Thu Aug 06 17:00:07 2009 +0000
     1.2 +++ b/test/automated/testsdl.c	Mon Aug 17 17:52:42 2009 +0000
     1.3 @@ -14,6 +14,7 @@
     1.4  #include "rwops/rwops.h"
     1.5  #include "surface/surface.h"
     1.6  #include "render/render.h"
     1.7 +#include "audio/audio.h"
     1.8  
     1.9  #include <stdio.h> /* printf */
    1.10  #include <stdlib.h> /* exit */
    1.11 @@ -32,6 +33,7 @@
    1.12  static int run_rwops       = 1; /**< Run RWops tests. */
    1.13  static int run_surface     = 1; /**< Run surface tests. */
    1.14  static int run_render      = 1; /**< Run render tests. */
    1.15 +static int run_audio       = 1; /**< Run audio tests. */
    1.16  
    1.17  /*
    1.18   * Prototypes.
    1.19 @@ -52,6 +54,7 @@
    1.20     printf("   --norwops       do not run the rwops tests\n");
    1.21     printf("   --nosurface     do not run the surface tests\n");
    1.22     printf("   --norender      do not run the render tests\n");
    1.23 +   printf("   --noaudio       do not run the audio tests\n");
    1.24     printf("   -v, --verbose   increases verbosity level by 1 for each -v\n");
    1.25     printf("   -q, --quiet     only displays errors\n");
    1.26     printf("   -h, --help      display this message and exit\n");
    1.27 @@ -69,6 +72,7 @@
    1.28        { "norwops", no_argument, 0, 0 },
    1.29        { "nosurface", no_argument, 0, 0 },
    1.30        { "norender", no_argument, 0, 0 },
    1.31 +      { "noaudio", no_argument, 0, 0 },
    1.32        { "verbose", no_argument, 0, 'v' },
    1.33        { "quiet", no_argument, 0, 'q' },
    1.34        { "help", no_argument, 0, 'h' },
    1.35 @@ -96,6 +100,8 @@
    1.36                 run_surface = 0;
    1.37              else if (strcmp(str,"norender")==0)
    1.38                 run_render = 0;
    1.39 +            else if (strcmp(str,"noaudio")==0)
    1.40 +               run_audio = 0;
    1.41              break;
    1.42  
    1.43           /* Manual. */
    1.44 @@ -154,6 +160,8 @@
    1.45        failed += test_surface();
    1.46     if (run_render)
    1.47        failed += test_render();
    1.48 +   if (run_audio)
    1.49 +      failed += test_audio();
    1.50  
    1.51     /* Manual tests. */
    1.52     if (run_manual) {