Ported testrect from original automation code, updated AssertEquals, added AssertTrue
authorMarkus Kauppila <markus.kauppila@gmail.com>
Wed, 01 Jun 2011 18:03:09 -0700
changeset 5677ecb455bdc5a5
parent 5676 02a0f7889834
child 5678 50401a6c3c95
Ported testrect from original automation code, updated AssertEquals, added AssertTrue
test/test-automation/Makefile.am
test/test-automation/SDL_test.c
test/test-automation/SDL_test.h
test/test-automation/configure.ac
test/test-automation/runner.c
test/test-automation/testrect/Makefile.am
test/test-automation/testrect/Makefile.in
test/test-automation/testrect/testrect.c
test/test-automation/tests/test.c
     1.1 --- a/test/test-automation/Makefile.am	Wed Jun 01 12:29:19 2011 +0300
     1.2 +++ b/test/test-automation/Makefile.am	Wed Jun 01 18:03:09 2011 -0700
     1.3 @@ -1,6 +1,6 @@
     1.4  ACLOCAL_AMFLAGS = -I acinclude -I build-scripts
     1.5  
     1.6 -SUBDIRS = tests
     1.7 +SUBDIRS = tests testrect
     1.8  
     1.9  bin_PROGRAMS = runner
    1.10  runner_SOURCES = runner.c SDL_test.c
    1.11 @@ -11,6 +11,8 @@
    1.12  install-tests:
    1.13  	-cp -f tests/.libs/*.dylib tests/ 2> /dev/null
    1.14  	-cp -f tests/.libs/*.so tests/ 2> /dev/null
    1.15 +	-cp -f testrect/.libs/*.dylib tests/ 2> /dev/null
    1.16 +	-cp -f testrect/.libs/*.so tests/ 2> /dev/null
    1.17  
    1.18  distclean-local:
    1.19  	-rm -Rf docs/
     2.1 --- a/test/test-automation/SDL_test.c	Wed Jun 01 12:29:19 2011 +0300
     2.2 +++ b/test/test-automation/SDL_test.c	Wed Jun 01 18:03:09 2011 -0700
     2.3 @@ -21,34 +21,67 @@
     2.4  #ifndef _SDL_TEST_C
     2.5  #define _SDL_TEST_C
     2.6  
     2.7 +#include <stdio.h> /* printf/fprintf */
     2.8 +#include <stdarg.h> /* va_list */
     2.9 +
    2.10  #include "SDL_test.h"
    2.11  
    2.12  /*! \brief return value of test case. Non-zero value means that the test failed */
    2.13  static int _testReturnValue;
    2.14  
    2.15 +static int _testAssertsFailed;
    2.16 +static int _testAssertsPassed;
    2.17 +
    2.18  void
    2.19  TestCaseInit()
    2.20  {
    2.21  	_testReturnValue = 0;
    2.22 +	_testAssertsFailed = 0;
    2.23 +	_testAssertsPassed = 0;
    2.24  }
    2.25  
    2.26  int
    2.27  TestCaseQuit()
    2.28  {
    2.29 +        printf("Asserts: passed %d, failed %d\n", _testAssertsPassed, _testAssertsFailed);
    2.30  	return _testReturnValue;
    2.31  }
    2.32  
    2.33 -void
    2.34 -AssertEquals(char *message, Uint32 expected, Uint32 actual)
    2.35 +void 
    2.36 +AssertEquals(Uint32 expected, Uint32 actual, char* message, ...)
    2.37  {
    2.38 -	if(expected != actual) {
    2.39 -		printf("===============================\n");
    2.40 -		printf("Assert failed: %s\n", message);
    2.41 -		printf("Expected %d, got %d\n", expected, actual);
    2.42 -		printf("===============================\n");
    2.43 -		_testReturnValue = 1;
    2.44 -	}
    2.45 +   va_list args;
    2.46 +   char buf[256];
    2.47 +
    2.48 +   if(expected != actual) {
    2.49 +      va_start( args, message );
    2.50 +      SDL_vsnprintf( buf, sizeof(buf), message, args );
    2.51 +      va_end( args );
    2.52 +      printf("Assert Equals failed: expected %d, got %d; %s\n", expected, actual, buf);
    2.53 +      _testReturnValue = 1;
    2.54 +      _testAssertsFailed++;
    2.55 +   } else {
    2.56 +      _testAssertsPassed++;
    2.57 +   }
    2.58  }
    2.59  
    2.60 +void 
    2.61 +AssertTrue(int condition, char *message, ...)
    2.62 +{
    2.63 +   va_list args;
    2.64 +   char buf[256];
    2.65 +
    2.66 +   if (!condition) {
    2.67 +      va_start( args, message );
    2.68 +      SDL_vsnprintf( buf, sizeof(buf), message, args );
    2.69 +      va_end( args );
    2.70 +
    2.71 +      printf("Assert IsTrue failed: %s\n", buf);
    2.72 +      _testReturnValue = 1;
    2.73 +      _testAssertsFailed++;
    2.74 +   } else {
    2.75 +      _testAssertsPassed++;
    2.76 +   }
    2.77 +}
    2.78  
    2.79  #endif
     3.1 --- a/test/test-automation/SDL_test.h	Wed Jun 01 12:29:19 2011 +0300
     3.2 +++ b/test/test-automation/SDL_test.h	Wed Jun 01 18:03:09 2011 -0700
     3.3 @@ -53,6 +53,8 @@
     3.4  int TestCaseQuit();
     3.5  
     3.6  
     3.7 -void AssertEquals(char *message, Uint32 expected, Uint32 actual);
     3.8 +void AssertEquals(Uint32 expected, Uint32 actual, char *message, ...);
     3.9 +
    3.10 +void AssertTrue(int condition, char *message, ...);
    3.11  
    3.12  #endif
     4.1 --- a/test/test-automation/configure.ac	Wed Jun 01 12:29:19 2011 +0300
     4.2 +++ b/test/test-automation/configure.ac	Wed Jun 01 18:03:09 2011 -0700
     4.3 @@ -33,7 +33,7 @@
     4.4  AC_FUNC_FORK
     4.5  
     4.6  AC_CONFIG_FILES([Makefile
     4.7 -				 tests/Makefile])
     4.8 +				 tests/Makefile testrect/Makefile])
     4.9  AC_OUTPUT
    4.10  
    4.11  echo ""
     5.1 --- a/test/test-automation/runner.c	Wed Jun 01 12:29:19 2011 +0300
     5.2 +++ b/test/test-automation/runner.c	Wed Jun 01 18:03:09 2011 -0700
     5.3 @@ -48,7 +48,7 @@
     5.4  #if defined(linux) || defined( __linux)
     5.5  	char *libName = "tests/libtest.so";
     5.6  #else
     5.7 -	char *libName = "tests/libtest.dylib";
     5.8 +	char *libName = "tests/libtestrect.dylib";
     5.9  #endif
    5.10  	return libName;
    5.11  }
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/test/test-automation/testrect/Makefile.am	Wed Jun 01 18:03:09 2011 -0700
     6.3 @@ -0,0 +1,9 @@
     6.4 +lib_LTLIBRARIES = libtestrect.la
     6.5 +libtestrect_la_SOURCES = testrect.c ../SDL_test.c
     6.6 +libtestrect_la_CLAGS = -fPIC -g
     6.7 +libtestrect_la_LDFLAGS = `sdl-config --libs`
     6.8 +
     6.9 +distclean-local:
    6.10 +	-rm *.dylib
    6.11 +	-rm *.so
    6.12 +
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/test/test-automation/testrect/Makefile.in	Wed Jun 01 18:03:09 2011 -0700
     7.3 @@ -0,0 +1,533 @@
     7.4 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
     7.5 +# @configure_input@
     7.6 +
     7.7 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     7.8 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     7.9 +# Inc.
    7.10 +# This Makefile.in is free software; the Free Software Foundation
    7.11 +# gives unlimited permission to copy and/or distribute it,
    7.12 +# with or without modifications, as long as this notice is preserved.
    7.13 +
    7.14 +# This program is distributed in the hope that it will be useful,
    7.15 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
    7.16 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    7.17 +# PARTICULAR PURPOSE.
    7.18 +
    7.19 +@SET_MAKE@
    7.20 +
    7.21 +VPATH = @srcdir@
    7.22 +pkgdatadir = $(datadir)/@PACKAGE@
    7.23 +pkgincludedir = $(includedir)/@PACKAGE@
    7.24 +pkglibdir = $(libdir)/@PACKAGE@
    7.25 +pkglibexecdir = $(libexecdir)/@PACKAGE@
    7.26 +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
    7.27 +install_sh_DATA = $(install_sh) -c -m 644
    7.28 +install_sh_PROGRAM = $(install_sh) -c
    7.29 +install_sh_SCRIPT = $(install_sh) -c
    7.30 +INSTALL_HEADER = $(INSTALL_DATA)
    7.31 +transform = $(program_transform_name)
    7.32 +NORMAL_INSTALL = :
    7.33 +PRE_INSTALL = :
    7.34 +POST_INSTALL = :
    7.35 +NORMAL_UNINSTALL = :
    7.36 +PRE_UNINSTALL = :
    7.37 +POST_UNINSTALL = :
    7.38 +build_triplet = @build@
    7.39 +host_triplet = @host@
    7.40 +subdir = testrect
    7.41 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
    7.42 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    7.43 +am__aclocal_m4_deps = $(top_srcdir)/acinclude/libtool.m4 \
    7.44 +	$(top_srcdir)/acinclude/ltoptions.m4 \
    7.45 +	$(top_srcdir)/acinclude/ltsugar.m4 \
    7.46 +	$(top_srcdir)/acinclude/ltversion.m4 \
    7.47 +	$(top_srcdir)/acinclude/lt~obsolete.m4 \
    7.48 +	$(top_srcdir)/configure.ac
    7.49 +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    7.50 +	$(ACLOCAL_M4)
    7.51 +mkinstalldirs = $(install_sh) -d
    7.52 +CONFIG_HEADER = $(top_builddir)/config.h
    7.53 +CONFIG_CLEAN_FILES =
    7.54 +CONFIG_CLEAN_VPATH_FILES =
    7.55 +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
    7.56 +am__vpath_adj = case $$p in \
    7.57 +    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    7.58 +    *) f=$$p;; \
    7.59 +  esac;
    7.60 +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
    7.61 +am__install_max = 40
    7.62 +am__nobase_strip_setup = \
    7.63 +  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
    7.64 +am__nobase_strip = \
    7.65 +  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
    7.66 +am__nobase_list = $(am__nobase_strip_setup); \
    7.67 +  for p in $$list; do echo "$$p $$p"; done | \
    7.68 +  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
    7.69 +  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
    7.70 +    if (++n[$$2] == $(am__install_max)) \
    7.71 +      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
    7.72 +    END { for (dir in files) print dir, files[dir] }'
    7.73 +am__base_list = \
    7.74 +  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    7.75 +  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
    7.76 +am__installdirs = "$(DESTDIR)$(libdir)"
    7.77 +LTLIBRARIES = $(lib_LTLIBRARIES)
    7.78 +libtestrect_la_LIBADD =
    7.79 +am_libtestrect_la_OBJECTS = testrect.lo SDL_test.lo
    7.80 +libtestrect_la_OBJECTS = $(am_libtestrect_la_OBJECTS)
    7.81 +libtestrect_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
    7.82 +	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
    7.83 +	$(libtestrect_la_LDFLAGS) $(LDFLAGS) -o $@
    7.84 +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
    7.85 +depcomp = $(SHELL) $(top_srcdir)/build-scripts/depcomp
    7.86 +am__depfiles_maybe = depfiles
    7.87 +am__mv = mv -f
    7.88 +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    7.89 +	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    7.90 +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
    7.91 +	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7.92 +	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    7.93 +CCLD = $(CC)
    7.94 +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
    7.95 +	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
    7.96 +	$(LDFLAGS) -o $@
    7.97 +SOURCES = $(libtestrect_la_SOURCES)
    7.98 +DIST_SOURCES = $(libtestrect_la_SOURCES)
    7.99 +ETAGS = etags
   7.100 +CTAGS = ctags
   7.101 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
   7.102 +ACLOCAL = @ACLOCAL@
   7.103 +AMTAR = @AMTAR@
   7.104 +AR = @AR@
   7.105 +AUTOCONF = @AUTOCONF@
   7.106 +AUTOHEADER = @AUTOHEADER@
   7.107 +AUTOMAKE = @AUTOMAKE@
   7.108 +AWK = @AWK@
   7.109 +CC = @CC@
   7.110 +CCDEPMODE = @CCDEPMODE@
   7.111 +CFLAGS = @CFLAGS@
   7.112 +CPP = @CPP@
   7.113 +CPPFLAGS = @CPPFLAGS@
   7.114 +CYGPATH_W = @CYGPATH_W@
   7.115 +DEFS = @DEFS@
   7.116 +DEPDIR = @DEPDIR@
   7.117 +DSYMUTIL = @DSYMUTIL@
   7.118 +DUMPBIN = @DUMPBIN@
   7.119 +ECHO_C = @ECHO_C@
   7.120 +ECHO_N = @ECHO_N@
   7.121 +ECHO_T = @ECHO_T@
   7.122 +EGREP = @EGREP@
   7.123 +EXEEXT = @EXEEXT@
   7.124 +FGREP = @FGREP@
   7.125 +GREP = @GREP@
   7.126 +INSTALL = @INSTALL@
   7.127 +INSTALL_DATA = @INSTALL_DATA@
   7.128 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
   7.129 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
   7.130 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
   7.131 +LD = @LD@
   7.132 +LDFLAGS = @LDFLAGS@
   7.133 +LIBOBJS = @LIBOBJS@
   7.134 +LIBS = @LIBS@
   7.135 +LIBTOOL = @LIBTOOL@
   7.136 +LIPO = @LIPO@
   7.137 +LN_S = @LN_S@
   7.138 +LTLIBOBJS = @LTLIBOBJS@
   7.139 +MAKEINFO = @MAKEINFO@
   7.140 +MKDIR_P = @MKDIR_P@
   7.141 +NM = @NM@
   7.142 +NMEDIT = @NMEDIT@
   7.143 +OBJDUMP = @OBJDUMP@
   7.144 +OBJEXT = @OBJEXT@
   7.145 +OTOOL = @OTOOL@
   7.146 +OTOOL64 = @OTOOL64@
   7.147 +PACKAGE = @PACKAGE@
   7.148 +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
   7.149 +PACKAGE_NAME = @PACKAGE_NAME@
   7.150 +PACKAGE_STRING = @PACKAGE_STRING@
   7.151 +PACKAGE_TARNAME = @PACKAGE_TARNAME@
   7.152 +PACKAGE_URL = @PACKAGE_URL@
   7.153 +PACKAGE_VERSION = @PACKAGE_VERSION@
   7.154 +PATH_SEPARATOR = @PATH_SEPARATOR@
   7.155 +RANLIB = @RANLIB@
   7.156 +SED = @SED@
   7.157 +SET_MAKE = @SET_MAKE@
   7.158 +SHELL = @SHELL@
   7.159 +STRIP = @STRIP@
   7.160 +VERSION = @VERSION@
   7.161 +abs_builddir = @abs_builddir@
   7.162 +abs_srcdir = @abs_srcdir@
   7.163 +abs_top_builddir = @abs_top_builddir@
   7.164 +abs_top_srcdir = @abs_top_srcdir@
   7.165 +ac_ct_CC = @ac_ct_CC@
   7.166 +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
   7.167 +am__include = @am__include@
   7.168 +am__leading_dot = @am__leading_dot@
   7.169 +am__quote = @am__quote@
   7.170 +am__tar = @am__tar@
   7.171 +am__untar = @am__untar@
   7.172 +bindir = @bindir@
   7.173 +build = @build@
   7.174 +build_alias = @build_alias@
   7.175 +build_cpu = @build_cpu@
   7.176 +build_os = @build_os@
   7.177 +build_vendor = @build_vendor@
   7.178 +builddir = @builddir@
   7.179 +datadir = @datadir@
   7.180 +datarootdir = @datarootdir@
   7.181 +docdir = @docdir@
   7.182 +dvidir = @dvidir@
   7.183 +exec_prefix = @exec_prefix@
   7.184 +host = @host@
   7.185 +host_alias = @host_alias@
   7.186 +host_cpu = @host_cpu@
   7.187 +host_os = @host_os@
   7.188 +host_vendor = @host_vendor@
   7.189 +htmldir = @htmldir@
   7.190 +includedir = @includedir@
   7.191 +infodir = @infodir@
   7.192 +install_sh = @install_sh@
   7.193 +libdir = @libdir@
   7.194 +libexecdir = @libexecdir@
   7.195 +localedir = @localedir@
   7.196 +localstatedir = @localstatedir@
   7.197 +lt_ECHO = @lt_ECHO@
   7.198 +mandir = @mandir@
   7.199 +mkdir_p = @mkdir_p@
   7.200 +oldincludedir = @oldincludedir@
   7.201 +pdfdir = @pdfdir@
   7.202 +prefix = @prefix@
   7.203 +program_transform_name = @program_transform_name@
   7.204 +psdir = @psdir@
   7.205 +sbindir = @sbindir@
   7.206 +sharedstatedir = @sharedstatedir@
   7.207 +srcdir = @srcdir@
   7.208 +sysconfdir = @sysconfdir@
   7.209 +target_alias = @target_alias@
   7.210 +top_build_prefix = @top_build_prefix@
   7.211 +top_builddir = @top_builddir@
   7.212 +top_srcdir = @top_srcdir@
   7.213 +lib_LTLIBRARIES = libtestrect.la
   7.214 +libtestrect_la_SOURCES = testrect.c ../SDL_test.c
   7.215 +libtestrect_la_CLAGS = -fPIC -g
   7.216 +libtestrect_la_LDFLAGS = `sdl-config --libs`
   7.217 +all: all-am
   7.218 +
   7.219 +.SUFFIXES:
   7.220 +.SUFFIXES: .c .lo .o .obj
   7.221 +$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
   7.222 +	@for dep in $?; do \
   7.223 +	  case '$(am__configure_deps)' in \
   7.224 +	    *$$dep*) \
   7.225 +	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
   7.226 +	        && { if test -f $@; then exit 0; else break; fi; }; \
   7.227 +	      exit 1;; \
   7.228 +	  esac; \
   7.229 +	done; \
   7.230 +	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testrect/Makefile'; \
   7.231 +	$(am__cd) $(top_srcdir) && \
   7.232 +	  $(AUTOMAKE) --gnu testrect/Makefile
   7.233 +.PRECIOUS: Makefile
   7.234 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
   7.235 +	@case '$?' in \
   7.236 +	  *config.status*) \
   7.237 +	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
   7.238 +	  *) \
   7.239 +	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
   7.240 +	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
   7.241 +	esac;
   7.242 +
   7.243 +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
   7.244 +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
   7.245 +
   7.246 +$(top_srcdir)/configure:  $(am__configure_deps)
   7.247 +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
   7.248 +$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
   7.249 +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
   7.250 +$(am__aclocal_m4_deps):
   7.251 +install-libLTLIBRARIES: $(lib_LTLIBRARIES)
   7.252 +	@$(NORMAL_INSTALL)
   7.253 +	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
   7.254 +	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
   7.255 +	list2=; for p in $$list; do \
   7.256 +	  if test -f $$p; then \
   7.257 +	    list2="$$list2 $$p"; \
   7.258 +	  else :; fi; \
   7.259 +	done; \
   7.260 +	test -z "$$list2" || { \
   7.261 +	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
   7.262 +	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
   7.263 +	}
   7.264 +
   7.265 +uninstall-libLTLIBRARIES:
   7.266 +	@$(NORMAL_UNINSTALL)
   7.267 +	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
   7.268 +	for p in $$list; do \
   7.269 +	  $(am__strip_dir) \
   7.270 +	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
   7.271 +	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
   7.272 +	done
   7.273 +
   7.274 +clean-libLTLIBRARIES:
   7.275 +	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
   7.276 +	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
   7.277 +	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
   7.278 +	  test "$$dir" != "$$p" || dir=.; \
   7.279 +	  echo "rm -f \"$${dir}/so_locations\""; \
   7.280 +	  rm -f "$${dir}/so_locations"; \
   7.281 +	done
   7.282 +libtestrect.la: $(libtestrect_la_OBJECTS) $(libtestrect_la_DEPENDENCIES) 
   7.283 +	$(libtestrect_la_LINK) -rpath $(libdir) $(libtestrect_la_OBJECTS) $(libtestrect_la_LIBADD) $(LIBS)
   7.284 +
   7.285 +mostlyclean-compile:
   7.286 +	-rm -f *.$(OBJEXT)
   7.287 +
   7.288 +distclean-compile:
   7.289 +	-rm -f *.tab.c
   7.290 +
   7.291 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL_test.Plo@am__quote@
   7.292 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrect.Plo@am__quote@
   7.293 +
   7.294 +.c.o:
   7.295 +@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
   7.296 +@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
   7.297 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
   7.298 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
   7.299 +@am__fastdepCC_FALSE@	$(COMPILE) -c $<
   7.300 +
   7.301 +.c.obj:
   7.302 +@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
   7.303 +@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
   7.304 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
   7.305 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
   7.306 +@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
   7.307 +
   7.308 +.c.lo:
   7.309 +@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
   7.310 +@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
   7.311 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
   7.312 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
   7.313 +@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
   7.314 +
   7.315 +SDL_test.lo: ../SDL_test.c
   7.316 +@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT SDL_test.lo -MD -MP -MF $(DEPDIR)/SDL_test.Tpo -c -o SDL_test.lo `test -f '../SDL_test.c' || echo '$(srcdir)/'`../SDL_test.c
   7.317 +@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/SDL_test.Tpo $(DEPDIR)/SDL_test.Plo
   7.318 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../SDL_test.c' object='SDL_test.lo' libtool=yes @AMDEPBACKSLASH@
   7.319 +@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
   7.320 +@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o SDL_test.lo `test -f '../SDL_test.c' || echo '$(srcdir)/'`../SDL_test.c
   7.321 +
   7.322 +mostlyclean-libtool:
   7.323 +	-rm -f *.lo
   7.324 +
   7.325 +clean-libtool:
   7.326 +	-rm -rf .libs _libs
   7.327 +
   7.328 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
   7.329 +	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
   7.330 +	unique=`for i in $$list; do \
   7.331 +	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   7.332 +	  done | \
   7.333 +	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
   7.334 +	      END { if (nonempty) { for (i in files) print i; }; }'`; \
   7.335 +	mkid -fID $$unique
   7.336 +tags: TAGS
   7.337 +
   7.338 +TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
   7.339 +		$(TAGS_FILES) $(LISP)
   7.340 +	set x; \
   7.341 +	here=`pwd`; \
   7.342 +	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
   7.343 +	unique=`for i in $$list; do \
   7.344 +	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   7.345 +	  done | \
   7.346 +	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
   7.347 +	      END { if (nonempty) { for (i in files) print i; }; }'`; \
   7.348 +	shift; \
   7.349 +	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
   7.350 +	  test -n "$$unique" || unique=$$empty_fix; \
   7.351 +	  if test $$# -gt 0; then \
   7.352 +	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
   7.353 +	      "$$@" $$unique; \
   7.354 +	  else \
   7.355 +	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
   7.356 +	      $$unique; \
   7.357 +	  fi; \
   7.358 +	fi
   7.359 +ctags: CTAGS
   7.360 +CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
   7.361 +		$(TAGS_FILES) $(LISP)
   7.362 +	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
   7.363 +	unique=`for i in $$list; do \
   7.364 +	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   7.365 +	  done | \
   7.366 +	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
   7.367 +	      END { if (nonempty) { for (i in files) print i; }; }'`; \
   7.368 +	test -z "$(CTAGS_ARGS)$$unique" \
   7.369 +	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
   7.370 +	     $$unique
   7.371 +
   7.372 +GTAGS:
   7.373 +	here=`$(am__cd) $(top_builddir) && pwd` \
   7.374 +	  && $(am__cd) $(top_srcdir) \
   7.375 +	  && gtags -i $(GTAGS_ARGS) "$$here"
   7.376 +
   7.377 +distclean-tags:
   7.378 +	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
   7.379 +
   7.380 +distdir: $(DISTFILES)
   7.381 +	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
   7.382 +	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
   7.383 +	list='$(DISTFILES)'; \
   7.384 +	  dist_files=`for file in $$list; do echo $$file; done | \
   7.385 +	  sed -e "s|^$$srcdirstrip/||;t" \
   7.386 +	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
   7.387 +	case $$dist_files in \
   7.388 +	  */*) $(MKDIR_P) `echo "$$dist_files" | \
   7.389 +			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
   7.390 +			   sort -u` ;; \
   7.391 +	esac; \
   7.392 +	for file in $$dist_files; do \
   7.393 +	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
   7.394 +	  if test -d $$d/$$file; then \
   7.395 +	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
   7.396 +	    if test -d "$(distdir)/$$file"; then \
   7.397 +	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
   7.398 +	    fi; \
   7.399 +	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
   7.400 +	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
   7.401 +	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
   7.402 +	    fi; \
   7.403 +	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
   7.404 +	  else \
   7.405 +	    test -f "$(distdir)/$$file" \
   7.406 +	    || cp -p $$d/$$file "$(distdir)/$$file" \
   7.407 +	    || exit 1; \
   7.408 +	  fi; \
   7.409 +	done
   7.410 +check-am: all-am
   7.411 +check: check-am
   7.412 +all-am: Makefile $(LTLIBRARIES)
   7.413 +installdirs:
   7.414 +	for dir in "$(DESTDIR)$(libdir)"; do \
   7.415 +	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
   7.416 +	done
   7.417 +install: install-am
   7.418 +install-exec: install-exec-am
   7.419 +install-data: install-data-am
   7.420 +uninstall: uninstall-am
   7.421 +
   7.422 +install-am: all-am
   7.423 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
   7.424 +
   7.425 +installcheck: installcheck-am
   7.426 +install-strip:
   7.427 +	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
   7.428 +	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
   7.429 +	  `test -z '$(STRIP)' || \
   7.430 +	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
   7.431 +mostlyclean-generic:
   7.432 +
   7.433 +clean-generic:
   7.434 +
   7.435 +distclean-generic:
   7.436 +	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
   7.437 +	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
   7.438 +
   7.439 +maintainer-clean-generic:
   7.440 +	@echo "This command is intended for maintainers to use"
   7.441 +	@echo "it deletes files that may require special tools to rebuild."
   7.442 +clean: clean-am
   7.443 +
   7.444 +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
   7.445 +	mostlyclean-am
   7.446 +
   7.447 +distclean: distclean-am
   7.448 +	-rm -rf ./$(DEPDIR)
   7.449 +	-rm -f Makefile
   7.450 +distclean-am: clean-am distclean-compile distclean-generic \
   7.451 +	distclean-local distclean-tags
   7.452 +
   7.453 +dvi: dvi-am
   7.454 +
   7.455 +dvi-am:
   7.456 +
   7.457 +html: html-am
   7.458 +
   7.459 +html-am:
   7.460 +
   7.461 +info: info-am
   7.462 +
   7.463 +info-am:
   7.464 +
   7.465 +install-data-am:
   7.466 +
   7.467 +install-dvi: install-dvi-am
   7.468 +
   7.469 +install-dvi-am:
   7.470 +
   7.471 +install-exec-am: install-libLTLIBRARIES
   7.472 +
   7.473 +install-html: install-html-am
   7.474 +
   7.475 +install-html-am:
   7.476 +
   7.477 +install-info: install-info-am
   7.478 +
   7.479 +install-info-am:
   7.480 +
   7.481 +install-man:
   7.482 +
   7.483 +install-pdf: install-pdf-am
   7.484 +
   7.485 +install-pdf-am:
   7.486 +
   7.487 +install-ps: install-ps-am
   7.488 +
   7.489 +install-ps-am:
   7.490 +
   7.491 +installcheck-am:
   7.492 +
   7.493 +maintainer-clean: maintainer-clean-am
   7.494 +	-rm -rf ./$(DEPDIR)
   7.495 +	-rm -f Makefile
   7.496 +maintainer-clean-am: distclean-am maintainer-clean-generic
   7.497 +
   7.498 +mostlyclean: mostlyclean-am
   7.499 +
   7.500 +mostlyclean-am: mostlyclean-compile mostlyclean-generic \
   7.501 +	mostlyclean-libtool
   7.502 +
   7.503 +pdf: pdf-am
   7.504 +
   7.505 +pdf-am:
   7.506 +
   7.507 +ps: ps-am
   7.508 +
   7.509 +ps-am:
   7.510 +
   7.511 +uninstall-am: uninstall-libLTLIBRARIES
   7.512 +
   7.513 +.MAKE: install-am install-strip
   7.514 +
   7.515 +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
   7.516 +	clean-libLTLIBRARIES clean-libtool ctags distclean \
   7.517 +	distclean-compile distclean-generic distclean-libtool \
   7.518 +	distclean-local distclean-tags distdir dvi dvi-am html html-am \
   7.519 +	info info-am install install-am install-data install-data-am \
   7.520 +	install-dvi install-dvi-am install-exec install-exec-am \
   7.521 +	install-html install-html-am install-info install-info-am \
   7.522 +	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
   7.523 +	install-ps install-ps-am install-strip installcheck \
   7.524 +	installcheck-am installdirs maintainer-clean \
   7.525 +	maintainer-clean-generic mostlyclean mostlyclean-compile \
   7.526 +	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
   7.527 +	tags uninstall uninstall-am uninstall-libLTLIBRARIES
   7.528 +
   7.529 +
   7.530 +distclean-local:
   7.531 +	-rm *.dylib
   7.532 +	-rm *.so
   7.533 +
   7.534 +# Tell versions [3.59,3.63) of GNU make to not export all variables.
   7.535 +# Otherwise a system limit (for SysV at least) may be exceeded.
   7.536 +.NOEXPORT:
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/test/test-automation/testrect/testrect.c	Wed Jun 01 18:03:09 2011 -0700
     8.3 @@ -0,0 +1,137 @@
     8.4 +/**
     8.5 + * Original code: automated SDL rect test written by Edgar Simo "bobbens"
     8.6 + */
     8.7 +
     8.8 +#include <stdio.h>
     8.9 +
    8.10 +#include <SDL/SDL.h>
    8.11 +
    8.12 +#include "../SDL_test.h"
    8.13 +
    8.14 +/* Test cases */
    8.15 +static const TestCaseReference test1 =
    8.16 +		(TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0 };
    8.17 +
    8.18 +/* Test suite */
    8.19 +extern const TestCaseReference *testSuite[] =  {
    8.20 +	&test1, NULL
    8.21 +};
    8.22 +
    8.23 +TestCaseReference **QueryTestSuite() {
    8.24 +	return (TestCaseReference **)testSuite;
    8.25 +}
    8.26 +
    8.27 +/**
    8.28 + * @brief Tests SDL_IntersectRectAndLine()
    8.29 + */
    8.30 +int rect_testIntersectRectAndLine (void *arg)
    8.31 +{
    8.32 +    SDL_Rect rect = { 0, 0, 32, 32 };
    8.33 +    int x1, y1;
    8.34 +    int x2, y2;
    8.35 +    SDL_bool clipped;
    8.36 +
    8.37 +    TestCaseInit();
    8.38 +
    8.39 +    x1 = -10;
    8.40 +    y1 = 0;
    8.41 +    x2 = -10;
    8.42 +    y2 = 31;
    8.43 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
    8.44 +    AssertTrue( !clipped &&
    8.45 +                   x1 == -10 && y1 == 0 && x2 == -10 && y2 == 31,
    8.46 +        "line outside to the left was incorrectly clipped: %d,%d - %d,%d",
    8.47 +        x1, y1, x2, y2);
    8.48 +
    8.49 +    x1 = 40;
    8.50 +    y1 = 0;
    8.51 +    x2 = 40;
    8.52 +    y2 = 31;
    8.53 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
    8.54 +    AssertTrue( !clipped &&
    8.55 +                   x1 == 40 && y1 == 0 && x2 == 40 && y2 == 31,
    8.56 +        "line outside to the right was incorrectly clipped: %d,%d - %d,%d",
    8.57 +        x1, y1, x2, y2);
    8.58 +
    8.59 +    x1 = 0;
    8.60 +    y1 = -10;
    8.61 +    x2 = 31;
    8.62 +    y2 = -10;
    8.63 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
    8.64 +    AssertTrue( !clipped &&
    8.65 +                   x1 == 0 && y1 == -10 && x2 == 31 && y2 == -10,
    8.66 +        "line outside above was incorrectly clipped: %d,%d - %d,%d",
    8.67 +        x1, y1, x2, y2);
    8.68 +
    8.69 +    x1 = 0;
    8.70 +    y1 = 40;
    8.71 +    x2 = 31;
    8.72 +    y2 = 40;
    8.73 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
    8.74 +    AssertTrue( !clipped &&
    8.75 +                   x1 == 0 && y1 == 40 && x2 == 31 && y2 == 40,
    8.76 +        "line outside below was incorrectly clipped: %d,%d - %d,%d",
    8.77 +        x1, y1, x2, y2);
    8.78 +
    8.79 +    x1 = 0;
    8.80 +    y1 = 0;
    8.81 +    x2 = 31;
    8.82 +    y2 = 31;
    8.83 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
    8.84 +    AssertTrue( clipped &&
    8.85 +                   x1 == 0 && y1 == 0 && x2 == 31 && y2 == 31,
    8.86 +        "line fully inside rect was clipped: %d,%d - %d,%d",
    8.87 +        x1, y1, x2, y2);
    8.88 +
    8.89 +    x1 = -10;
    8.90 +    y1 = 15;
    8.91 +    x2 = 40;
    8.92 +    y2 = 15;
    8.93 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
    8.94 +    AssertTrue( clipped &&
    8.95 +                   x1 == 0 && y1 == 15 && x2 == 31 && y2 == 15,
    8.96 +        "horizontal line rect was incorrectly clipped: %d,%d - %d,%d",
    8.97 +        x1, y1, x2, y2);
    8.98 +
    8.99 +    x1 = -32;
   8.100 +    y1 = -32;
   8.101 +    x2 = 63;
   8.102 +    y2 = 63;
   8.103 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
   8.104 +    AssertTrue( clipped &&
   8.105 +                   x1 == 0 && y1 == 0 && x2 == 31 && y2 == 31,
   8.106 +        "diagonal line to lower right was incorrectly clipped: %d,%d - %d,%d",
   8.107 +        x1, y1, x2, y2);
   8.108 +
   8.109 +    x1 = 63;
   8.110 +    y1 = 63;
   8.111 +    x2 = -32;
   8.112 +    y2 = -32;
   8.113 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
   8.114 +    AssertTrue( clipped &&
   8.115 +                   x1 == 31 && y1 == 31 && x2 == 0 && y2 == 0,
   8.116 +        "diagonal line to upper left was incorrectly clipped: %d,%d - %d,%d",
   8.117 +        x1, y1, x2, y2);
   8.118 +
   8.119 +    x1 = 63;
   8.120 +    y1 = -32;
   8.121 +    x2 = -32;
   8.122 +    y2 = 63;
   8.123 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
   8.124 +    AssertTrue( clipped &&
   8.125 +                   x1 == 31 && y1 == 0 && x2 == 0 && y2 == 31,
   8.126 +        "diagonal line to lower left was incorrectly clipped: %d,%d - %d,%d",
   8.127 +        x1, y1, x2, y2);
   8.128 +
   8.129 +    x1 = -32;
   8.130 +    y1 = 63;
   8.131 +    x2 = 63;
   8.132 +    y2 = -32;
   8.133 +    clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
   8.134 +    AssertTrue( clipped &&
   8.135 +                   x1 == 0 && y1 == 31 && x2 == 31 && y2 == 0,
   8.136 +        "diagonal line to upper right was incorrectly clipped: %d,%d - %d,%d",
   8.137 +        x1, y1, x2, y2);
   8.138 +
   8.139 +    return TestCaseQuit();
   8.140 +}
     9.1 --- a/test/test-automation/tests/test.c	Wed Jun 01 12:29:19 2011 +0300
     9.2 +++ b/test/test-automation/tests/test.c	Wed Jun 01 18:03:09 2011 -0700
     9.3 @@ -55,7 +55,7 @@
     9.4  	const char *revision = SDL_GetRevision();
     9.5  
     9.6  	printf("Revision is %s\n", revision);
     9.7 -	AssertEquals("will fail", 3, 5);
     9.8 +	AssertEquals(3, 5, "fails");
     9.9  
    9.10  	return TestCaseQuit();
    9.11  }
    9.12 @@ -75,7 +75,7 @@
    9.13  	TestCaseInit();
    9.14  	printf("hello3\n");
    9.15  
    9.16 -	AssertEquals("passes", 3, 3);
    9.17 +	AssertEquals(3, 3, "passes");
    9.18  
    9.19  	return TestCaseQuit();
    9.20  }