diff options
Diffstat (limited to 'tests/freealut/test_suite')
-rw-r--r-- | tests/freealut/test_suite/Makefile.am | 27 | ||||
-rw-r--r-- | tests/freealut/test_suite/Makefile.in | 513 | ||||
-rw-r--r-- | tests/freealut/test_suite/README | 33 | ||||
-rw-r--r-- | tests/freealut/test_suite/file1.wav | bin | 0 -> 6246 bytes | |||
-rw-r--r-- | tests/freealut/test_suite/file2.au | bin | 0 -> 6400 bytes | |||
-rw-r--r-- | tests/freealut/test_suite/file3.raw | 1 | ||||
-rw-r--r-- | tests/freealut/test_suite/test_errorstuff.c | 23 | ||||
-rw-r--r-- | tests/freealut/test_suite/test_fileloader.c | 74 | ||||
-rw-r--r-- | tests/freealut/test_suite/test_memoryloader.c | 98 | ||||
-rw-r--r-- | tests/freealut/test_suite/test_retrostuff.c | 79 | ||||
-rw-r--r-- | tests/freealut/test_suite/test_version.c | 36 | ||||
-rw-r--r-- | tests/freealut/test_suite/test_waveforms.c | 31 |
12 files changed, 915 insertions, 0 deletions
diff --git a/tests/freealut/test_suite/Makefile.am b/tests/freealut/test_suite/Makefile.am new file mode 100644 index 00000000..898e1925 --- /dev/null +++ b/tests/freealut/test_suite/Makefile.am @@ -0,0 +1,27 @@ +# The following files should be in our source distribution in addition to the +# standard ones included by automake itself: +EXTRA_DIST = \ + file1.wav \ + file2.au \ + file3.raw + +# Build, but do not install the following test programs: +noinst_PROGRAMS = \ + test_errorstuff \ + test_fileloader \ + test_memoryloader \ + test_retrostuff \ + test_version \ + test_waveforms + +# We need to link against our *own* libalut. +LDADD = ../src/libalut.la + +# Specifying the following path is needed to find <AL/alut.h>. +AM_CPPFLAGS = -I$(top_srcdir)/include + +# test_retrostuff tests deprecated functions, but we don't want to get compiler +# warnings because of that. +if WNO_DEPRECATED_DECLARATIONS +test_retrostuff_CFLAGS = -Wno-deprecated-declarations +endif diff --git a/tests/freealut/test_suite/Makefile.in b/tests/freealut/test_suite/Makefile.in new file mode 100644 index 00000000..ed7c67ca --- /dev/null +++ b/tests/freealut/test_suite/Makefile.in @@ -0,0 +1,513 @@ +# Makefile.in generated by automake 1.9.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +SOURCES = test_errorstuff.c test_fileloader.c test_memoryloader.c test_retrostuff.c test_version.c test_waveforms.c + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = test_errorstuff$(EXEEXT) test_fileloader$(EXEEXT) \ + test_memoryloader$(EXEEXT) test_retrostuff$(EXEEXT) \ + test_version$(EXEEXT) test_waveforms$(EXEEXT) +subdir = test_suite +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \ + $(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \ + $(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \ + $(top_srcdir)/admin/autotools/m4/alut_check_func.m4 \ + $(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +test_errorstuff_SOURCES = test_errorstuff.c +test_errorstuff_OBJECTS = test_errorstuff.$(OBJEXT) +test_errorstuff_LDADD = $(LDADD) +test_errorstuff_DEPENDENCIES = ../src/libalut.la +test_fileloader_SOURCES = test_fileloader.c +test_fileloader_OBJECTS = test_fileloader.$(OBJEXT) +test_fileloader_LDADD = $(LDADD) +test_fileloader_DEPENDENCIES = ../src/libalut.la +test_memoryloader_SOURCES = test_memoryloader.c +test_memoryloader_OBJECTS = test_memoryloader.$(OBJEXT) +test_memoryloader_LDADD = $(LDADD) +test_memoryloader_DEPENDENCIES = ../src/libalut.la +test_retrostuff_SOURCES = test_retrostuff.c +test_retrostuff_OBJECTS = test_retrostuff-test_retrostuff.$(OBJEXT) +test_retrostuff_LDADD = $(LDADD) +test_retrostuff_DEPENDENCIES = ../src/libalut.la +test_version_SOURCES = test_version.c +test_version_OBJECTS = test_version.$(OBJEXT) +test_version_LDADD = $(LDADD) +test_version_DEPENDENCIES = ../src/libalut.la +test_waveforms_SOURCES = test_waveforms.c +test_waveforms_OBJECTS = test_waveforms.$(OBJEXT) +test_waveforms_LDADD = $(LDADD) +test_waveforms_DEPENDENCIES = ../src/libalut.la +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/autotools/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = test_errorstuff.c test_fileloader.c test_memoryloader.c \ + test_retrostuff.c test_version.c test_waveforms.c +DIST_SOURCES = test_errorstuff.c test_fileloader.c test_memoryloader.c \ + test_retrostuff.c test_version.c test_waveforms.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSIONINFO = @VERSIONINFO@ +WNO_DEPRECATED_DECLARATIONS_FALSE = @WNO_DEPRECATED_DECLARATIONS_FALSE@ +WNO_DEPRECATED_DECLARATIONS_TRUE = @WNO_DEPRECATED_DECLARATIONS_TRUE@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +# The following files should be in our source distribution in addition to the +# standard ones included by automake itself: +EXTRA_DIST = \ + file1.wav \ + file2.au \ + file3.raw + + +# We need to link against our *own* libalut. +LDADD = ../src/libalut.la + +# Specifying the following path is needed to find <AL/alut.h>. +AM_CPPFLAGS = -I$(top_srcdir)/include + +# test_retrostuff tests deprecated functions, but we don't want to get compiler +# warnings because of that. +@WNO_DEPRECATED_DECLARATIONS_TRUE@test_retrostuff_CFLAGS = -Wno-deprecated-declarations +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test_suite/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu test_suite/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +test_errorstuff$(EXEEXT): $(test_errorstuff_OBJECTS) $(test_errorstuff_DEPENDENCIES) + @rm -f test_errorstuff$(EXEEXT) + $(LINK) $(test_errorstuff_LDFLAGS) $(test_errorstuff_OBJECTS) $(test_errorstuff_LDADD) $(LIBS) +test_fileloader$(EXEEXT): $(test_fileloader_OBJECTS) $(test_fileloader_DEPENDENCIES) + @rm -f test_fileloader$(EXEEXT) + $(LINK) $(test_fileloader_LDFLAGS) $(test_fileloader_OBJECTS) $(test_fileloader_LDADD) $(LIBS) +test_memoryloader$(EXEEXT): $(test_memoryloader_OBJECTS) $(test_memoryloader_DEPENDENCIES) + @rm -f test_memoryloader$(EXEEXT) + $(LINK) $(test_memoryloader_LDFLAGS) $(test_memoryloader_OBJECTS) $(test_memoryloader_LDADD) $(LIBS) +test_retrostuff$(EXEEXT): $(test_retrostuff_OBJECTS) $(test_retrostuff_DEPENDENCIES) + @rm -f test_retrostuff$(EXEEXT) + $(LINK) $(test_retrostuff_LDFLAGS) $(test_retrostuff_OBJECTS) $(test_retrostuff_LDADD) $(LIBS) +test_version$(EXEEXT): $(test_version_OBJECTS) $(test_version_DEPENDENCIES) + @rm -f test_version$(EXEEXT) + $(LINK) $(test_version_LDFLAGS) $(test_version_OBJECTS) $(test_version_LDADD) $(LIBS) +test_waveforms$(EXEEXT): $(test_waveforms_OBJECTS) $(test_waveforms_DEPENDENCIES) + @rm -f test_waveforms$(EXEEXT) + $(LINK) $(test_waveforms_LDFLAGS) $(test_waveforms_OBJECTS) $(test_waveforms_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_errorstuff.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_fileloader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_memoryloader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_retrostuff-test_retrostuff.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_version.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_waveforms.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +test_retrostuff-test_retrostuff.o: test_retrostuff.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_retrostuff_CFLAGS) $(CFLAGS) -MT test_retrostuff-test_retrostuff.o -MD -MP -MF "$(DEPDIR)/test_retrostuff-test_retrostuff.Tpo" -c -o test_retrostuff-test_retrostuff.o `test -f 'test_retrostuff.c' || echo '$(srcdir)/'`test_retrostuff.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_retrostuff-test_retrostuff.Tpo" "$(DEPDIR)/test_retrostuff-test_retrostuff.Po"; else rm -f "$(DEPDIR)/test_retrostuff-test_retrostuff.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_retrostuff.c' object='test_retrostuff-test_retrostuff.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_retrostuff_CFLAGS) $(CFLAGS) -c -o test_retrostuff-test_retrostuff.o `test -f 'test_retrostuff.c' || echo '$(srcdir)/'`test_retrostuff.c + +test_retrostuff-test_retrostuff.obj: test_retrostuff.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_retrostuff_CFLAGS) $(CFLAGS) -MT test_retrostuff-test_retrostuff.obj -MD -MP -MF "$(DEPDIR)/test_retrostuff-test_retrostuff.Tpo" -c -o test_retrostuff-test_retrostuff.obj `if test -f 'test_retrostuff.c'; then $(CYGPATH_W) 'test_retrostuff.c'; else $(CYGPATH_W) '$(srcdir)/test_retrostuff.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_retrostuff-test_retrostuff.Tpo" "$(DEPDIR)/test_retrostuff-test_retrostuff.Po"; else rm -f "$(DEPDIR)/test_retrostuff-test_retrostuff.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_retrostuff.c' object='test_retrostuff-test_retrostuff.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_retrostuff_CFLAGS) $(CFLAGS) -c -o test_retrostuff-test_retrostuff.obj `if test -f 'test_retrostuff.c'; then $(CYGPATH_W) 'test_retrostuff.c'; else $(CYGPATH_W) '$(srcdir)/test_retrostuff.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/freealut/test_suite/README b/tests/freealut/test_suite/README new file mode 100644 index 00000000..905fbd9f --- /dev/null +++ b/tests/freealut/test_suite/README @@ -0,0 +1,33 @@ + +ALUT Test Suite +~~~~~~~~~~~~~~~ + +These programs are not intended to be particularly excellent +programming style (some of them are downright terrible!) - but +they do provide a reasonable way to test out that ALUT is working +correctly. + +test_version : Tests that the ALUT header file version agrees with + the ALUT library version. + +test_waveforms : Plays a second of 440Hz audio using a variety of waveforms + in order to exercise the ALUT sound synthesis routines. + +test_errorstuff : Tries to load a non-existant file in order to test ALUT's + error handler. + +test_fileloader : Loads three files (in different formats) using ALUT's + 'standard' file loader. + +test_memoryloader: Loads a WAV file into memory - then uses ALUT's + 'File Image' loader. + +test_retrostuff : Loads a WAV file using the two old-fashioned methods from + ALUT 0.x.x + +If compiling these programs produces lots of errors, then you've probably +got an old ALUT header file lying around somewhere. If that's the case +then the 'test_version' program should at least have compiled. You +can run it to verify the version numbers of both header and ALUT library +binary. + diff --git a/tests/freealut/test_suite/file1.wav b/tests/freealut/test_suite/file1.wav Binary files differnew file mode 100644 index 00000000..101029c5 --- /dev/null +++ b/tests/freealut/test_suite/file1.wav diff --git a/tests/freealut/test_suite/file2.au b/tests/freealut/test_suite/file2.au Binary files differnew file mode 100644 index 00000000..f5fb0096 --- /dev/null +++ b/tests/freealut/test_suite/file2.au diff --git a/tests/freealut/test_suite/file3.raw b/tests/freealut/test_suite/file3.raw new file mode 100644 index 00000000..80d41b6e --- /dev/null +++ b/tests/freealut/test_suite/file3.raw @@ -0,0 +1 @@ +~~~~~~~}~~||}y|~||}z{zysn{xip
{wmwxhwz|}
ik~{px|
~otw}{|vjnwu}{|powx{wlxt}|
||ymt||
}~xtn{w~ywjxt}|}qpuw}
jx}}
snnr}~}|w
}x~{}rwz}~so~pu{y|}yrr~ptxryy|
}|}t{x
w|~}q~v~jz
p}r}|ymx}prturymvmt{o||y{|xtuxy|tvrxmup}{r
}{{ty{r{y|w os~xu{zzq}~vr~k}vv}p}x
uwxvuz}uvzmwy{s}w|v|~ywskqxtp
yt{w|}nvsv~utzz}n
xpzzs|xtz
|x{zsz
my
pzzpzozxuus
zx~{yq{pp
r}sw{lsnyy{~rv||~yuqunzzzqvuy
~t}
wq~vq~xy{v}~u~tw|t{zzztzt
wvz|v~y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
|{}~}|}||{}
zz}~|x
~}}z|z~~}|{}|}~}~}yz~{~~~}}|{}z|}|}~}~{~x|~}~~|y|~~~}~}}{~|}}}}}~~~|{}}~}|}}
~||~}|~|{
}}~~}~~
|{~}~~||}~~||~}~}~~|{}~|}~||~}}~}}|~|~~}~~~~~~}}}|~~}~~}|~~~}}~~}~}~~}||~}~~~}||~~|~}}{~
|}}~}~||{~~~}}z~~|~}~
{{~}~~}~~~
\ No newline at end of file diff --git a/tests/freealut/test_suite/test_errorstuff.c b/tests/freealut/test_suite/test_errorstuff.c new file mode 100644 index 00000000..7d21e9d6 --- /dev/null +++ b/tests/freealut/test_suite/test_errorstuff.c @@ -0,0 +1,23 @@ +#include <stdio.h> +#include <stdlib.h> +#include <AL/alut.h> + +/* + * This is a minimal test for error handling. + */ + +int main(int argc, char **argv) +{ + ALuint buffer; + + alutInit(&argc, argv); + buffer = alutCreateBufferFromFile("no_such_file_in_existance.wav"); + alutExit(); + + if (buffer != AL_NONE) + { + fprintf(stderr, "expected an I/O error\n"); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} diff --git a/tests/freealut/test_suite/test_fileloader.c b/tests/freealut/test_suite/test_fileloader.c new file mode 100644 index 00000000..ce447daf --- /dev/null +++ b/tests/freealut/test_suite/test_fileloader.c @@ -0,0 +1,74 @@ +#include <stdlib.h> +#include <stdio.h> +#include <AL/alut.h> + +/* + * This program loads and plays a variety of files, basically an automated + * version of examples/playfile.c. + */ + +static void playFile(const char *fileName) +{ + ALuint buffer; + ALuint source; + ALenum error; + ALint status; + + /* Create an AL buffer from the given sound file. */ + buffer = alutCreateBufferFromFile(fileName); + if (buffer == AL_NONE) + { + error = alutGetError(); + fprintf(stderr, "Error loading file: '%s'\n", alutGetErrorString(error)); + alutExit(); + exit(EXIT_FAILURE); + } + + /* Generate a single source, attach the buffer to it and start playing. */ + alGenSources(1, &source); + alSourcei(source, AL_BUFFER, buffer); + alSourcePlay(source); + + /* Normally nothing should go wrong above, but one never knows... */ + error = alGetError(); + if (error != ALUT_ERROR_NO_ERROR) + { + fprintf(stderr, "%s\n", alGetString(error)); + alutExit(); + exit(EXIT_FAILURE); + } + + /* Check every 0.1 seconds if the sound is still playing. */ + do + { + alutSleep(0.1f); + alGetSourcei(source, AL_SOURCE_STATE, &status); + } + while (status == AL_PLAYING); +} + +int main(int argc, char **argv) +{ + /* Initialise ALUT and eat any ALUT-specific commandline flags. */ + if (!alutInit(&argc, argv)) + { + ALenum error = alutGetError(); + + fprintf(stderr, "%s\n", alutGetErrorString(error)); + exit(EXIT_FAILURE); + } + + /* If everything is OK, play the sound files and exit when finished. */ + playFile("file1.wav"); + playFile("file2.au"); + playFile("file3.raw"); + + if (!alutExit()) + { + ALenum error = alutGetError(); + + fprintf(stderr, "%s\n", alutGetErrorString(error)); + exit(EXIT_FAILURE); + } + return EXIT_SUCCESS; +} diff --git a/tests/freealut/test_suite/test_memoryloader.c b/tests/freealut/test_suite/test_memoryloader.c new file mode 100644 index 00000000..a51e1744 --- /dev/null +++ b/tests/freealut/test_suite/test_memoryloader.c @@ -0,0 +1,98 @@ +#include <stdio.h> +#include <stdlib.h> +#include <AL/alut.h> + +/* + * This program loads and plays a variety of files from memory, + * basically a modified version of test_suite/test_fileloader.c. + */ + +static ALbyte fileBuffer[100000]; + +static void playFile(const char *fileName) +{ + FILE *fileDescriptor; + size_t fileLength; + ALuint buffer; + ALuint source; + ALenum error; + ALint status; + + /* Load the sound file into memory. */ + fileDescriptor = fopen(fileName, "rb"); + if (fileDescriptor == NULL) + { + fprintf(stderr, "Error opening file %s\n", fileName); + alutExit(); + exit(EXIT_FAILURE); + } + + fileLength = fread(fileBuffer, 1, sizeof(fileBuffer), fileDescriptor); + if (ferror(fileDescriptor)) + { + fprintf(stderr, "Error reading file %s\n", fileName); + alutExit(); + exit(EXIT_FAILURE); + } + + fclose(fileDescriptor); + + /* Create an AL buffer from the given sound file. */ + buffer = alutCreateBufferFromFileImage(fileBuffer, fileLength); + if (buffer == AL_NONE) + { + error = alutGetError(); + fprintf(stderr, "Error creating buffer from file image: '%s'\n", alutGetErrorString(error)); + alutExit(); + exit(EXIT_FAILURE); + } + + /* Generate a single source, attach the buffer to it and start playing. */ + alGenSources(1, &source); + alSourcei(source, AL_BUFFER, buffer); + alSourcePlay(source); + + /* Normally nothing should go wrong above, but one never knows... */ + error = alGetError(); + if (error != ALUT_ERROR_NO_ERROR) + { + fprintf(stderr, "%s\n", alGetString(error)); + alutExit(); + exit(EXIT_FAILURE); + } + + /* Check every 0.1 seconds if the sound is still playing. */ + do + { + alutSleep(0.1f); + alGetSourcei(source, AL_SOURCE_STATE, &status); + } + while (status == AL_PLAYING); +} + +int main(int argc, char **argv) +{ + /* Initialise ALUT and eat any ALUT-specific commandline flags. */ + if (!alutInit(&argc, argv)) + { + ALenum error = alutGetError(); + + fprintf(stderr, "%s\n", alutGetErrorString(error)); + exit(EXIT_FAILURE); + } + + /* If everything is OK, play the sound files and exit when finished. */ + playFile("file1.wav"); + playFile("file2.au"); + /* Note that we can not play raw sound files from memory because the + * format can't be guessed without a file name. */ + + if (!alutExit()) + { + ALenum error = alutGetError(); + + fprintf(stderr, "%s\n", alutGetErrorString(error)); + exit(EXIT_FAILURE); + } + return EXIT_SUCCESS; +} diff --git a/tests/freealut/test_suite/test_retrostuff.c b/tests/freealut/test_suite/ |