testtools-0.1/0000755000175000017500000000000012573620142013646 5ustar zmoelnigzmoelnigtesttools-0.1/Makefile0000644000175000017500000003624511674625224015327 0ustar zmoelnigzmoelnig## Pd library template version 1.0.12 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = testtools # add your .c source files, one object per file, to the SOURCES # variable, help files will be included automatically, and for GUI # objects, the matching .tcl file too SOURCES = # list all pd objects (i.e. myobject.pd) files here, and their helpfiles will # be included automatically PDOBJECTS = unit-test-frame.pd unit-test-frame~.pd # example patches and related files, in the 'examples' subfolder EXAMPLES = example-unittest.pd example~-unittest.pd example.wav example~.wav # manuals and related files, in the 'manual' subfolder MANUAL = # if you want to include any other files in the source and binary tarballs, # list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included EXTRA_DIST = #------------------------------------------------------------------------------# # # things you might need to edit if you are using other C libraries # #------------------------------------------------------------------------------# ALL_CFLAGS = -I"$(PD_INCLUDE)" ALL_LDFLAGS = SHARED_LDFLAGS = ALL_LIBS = #------------------------------------------------------------------------------# # # you shouldn't need to edit anything below here, if we did it right :) # #------------------------------------------------------------------------------# # these can be set from outside without (usually) breaking the build CFLAGS = -Wall -W -g LDFLAGS = LIBS = # get library version from meta file LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) ALL_CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"' PD_INCLUDE = $(PD_PATH)/include/pd # where to install the library, overridden below depending on platform prefix = /usr/local libdir = $(prefix)/lib pkglibdir = $(libdir)/pd-externals objectsdir = $(pkglibdir) INSTALL = install INSTALL_PROGRAM = $(INSTALL) -p -m 644 INSTALL_DATA = $(INSTALL) -p -m 644 INSTALL_DIR = $(INSTALL) -p -m 755 -d ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION) ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION) UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) CPU := $(shell uname -p) ifeq ($(CPU),arm) # iPhone/iPod Touch SOURCES += $(SOURCES_iphoneos) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = iphoneos PD_PATH = /Applications/Pd-extended.app/Contents/Resources IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin CC=$(IPHONE_BASE)/gcc CPP=$(IPHONE_BASE)/cpp CXX=$(IPHONE_BASE)/g++ ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer ALL_CFLAGS := $(IPHONE_CFLAGS) $(ALL_CFLAGS) ALL_LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) SHARED_LDFLAGS += -arch armv6 -dynamiclib -undefined dynamic_lookup $(ISYSROOT) ALL_LIBS += -lc $(LIBS_iphoneos) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) else # Mac OS X SOURCES += $(SOURCES_macosx) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = macosx PD_PATH = /Applications/Pd-extended.app/Contents/Resources OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast # build universal 32-bit on 10.4 and 32/64 on newer ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 else FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 SOURCES += $(SOURCES_iphoneos) endif ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include # if the 'pd' binary exists, check the linking against it to aid with stripping BUNDLE_LOADER = $(shell test ! -e $(PD_PATH)/bin/pd || echo -bundle_loader $(PD_PATH)/bin/pd) ALL_LDFLAGS += $(FAT_FLAGS) -bundle $(BUNDLE_LOADER) -undefined dynamic_lookup -L/sw/lib SHARED_LDFLAGS += $(FAT_FLAGS) -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(SHARED_LIB) -compatibility_version 1 -current_version 1.0 ALL_LIBS += -lc $(LIBS_macosx) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) # install into ~/Library/Pd on Mac OS X since /usr/local isn't used much pkglibdir=$(HOME)/Library/Pd endif endif # Tho Android uses Linux, we use this fake uname to provide an easy way to # setup all this things needed to cross-compile for Android using the NDK ifeq ($(UNAME),ANDROID) CPU := arm SOURCES += $(SOURCES_android) EXTENSION = pd_linux SHARED_EXTENSION = so OS = android PD_PATH = /usr NDK_BASE := /usr/local/android-ndk NDK_PLATFORM_VERSION := 5 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]') NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86 CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT) OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer CFLAGS += LDFLAGS += -rdynamic -shared SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared LIBS += -lc $(LIBS_android) STRIP := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-strip \ --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU) # GNU/Hurd, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU/kFreeBSD) # Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_cygwin) EXTENSION = dll SHARED_EXTENSION = dll OS = cygwin PD_PATH = $(shell cygpath $$PROGRAMFILES)/pd OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += ALL_LDFLAGS += -rdynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc -lpd $(LIBS_cygwin) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif ifeq (MINGW,$(findstring MINGW,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_windows) EXTENSION = dll SHARED_EXTENSION = dll OS = windows PD_PATH = $(shell cd "$$PROGRAMFILES/pd" && pwd) # MinGW doesn't seem to include cc so force gcc CC=gcc OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -mms-bitfields ALL_LDFLAGS += -s -shared -Wl,--enable-auto-import -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" SHARED_LDFLAGS += -shared ALL_LIBS += -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 $(LIBS_windows) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif # in case somebody manually set the HELPPATCHES above HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd) ALL_CFLAGS := $(ALL_CFLAGS) $(CFLAGS) $(OPT_CFLAGS) ALL_LDFLAGS := $(LDFLAGS) $(ALL_LDFLAGS) ALL_LIBS := $(LIBS) $(ALL_LIBS) SHARED_SOURCE ?= $(wildcard lib$(LIBRARY_NAME).c) SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h) SHARED_LIB = $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION)) SHARED_TCL_LIB = $(wildcard lib$(LIBRARY_NAME).tcl) .PHONY = install libdir_install single_install install-doc install-examples install-manual clean distclean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) %.o: %.c $(CC) $(ALL_CFLAGS) -o "$*.o" -c "$*.c" %.$(EXTENSION): %.o $(SHARED_LIB) $(CC) $(ALL_LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(ALL_LIBS) $(SHARED_LIB) chmod a-x "$*.$(EXTENSION)" # this links everything into a single binary file $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(CC) $(ALL_LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(ALL_LIBS) chmod a-x $(LIBRARY_NAME).$(EXTENSION) $(SHARED_LIB): $(SHARED_SOURCE:.c=.o) $(CC) $(SHARED_LDFLAGS) -o $(SHARED_LIB) $(SHARED_SOURCE:.c=.o) $(LIBS) install: libdir_install # The meta and help files are explicitly installed to make sure they are # actually there. Those files are not optional, then need to be there. libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES))" || (\ $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \ $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION)))) test -z "$(strip $(SHARED_LIB))" || \ $(INSTALL_DATA) $(SHARED_LIB) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(wildcard $(SOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(SOURCES:.c=.tcl)) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SHARED_TCL_LIB))" || \ $(INSTALL_DATA) $(SHARED_TCL_LIB) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) # install library linked as single binary single_install: $(LIBRARY_NAME) install-doc install-examples install-manual $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) install-doc: $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ $(INSTALL_DATA) $(HELPPATCHES) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt install-examples: test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \ done install-manual: test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ done clean: -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) $(SHARED_SOURCE:.c=.o) -rm -f -- $(SOURCES:.c=.$(EXTENSION)) -rm -f -- $(LIBRARY_NAME).o -rm -f -- $(LIBRARY_NAME).$(EXTENSION) -rm -f -- $(SHARED_LIB) distclean: clean -rm -f -- $(DISTBINDIR).tar.gz -rm -rf -- $(DISTBINDIR) -rm -f -- $(DISTDIR).tar.gz -rm -rf -- $(DISTDIR) -rm -f -- $(ORIGDIR).tar.gz -rm -rf -- $(ORIGDIR) $(DISTBINDIR): $(INSTALL_DIR) $(DISTBINDIR) libdir: all $(DISTBINDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) $(INSTALL_DATA) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) $(DISTBINDIR) $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR) # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) $(DISTDIR): $(INSTALL_DIR) $(DISTDIR) $(ORIGDIR): $(INSTALL_DIR) $(ORIGDIR) dist: $(DISTDIR) $(INSTALL_DATA) Makefile $(DISTDIR) $(INSTALL_DATA) README.txt $(DISTDIR) $(INSTALL_DATA) LICENSE.txt $(DISTDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR) test -z "$(strip $(ALLSOURCES))" || \ $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR) test -z "$(strip $(wildcard $(ALLSOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(ALLSOURCES:.c=.tcl)) $(DISTDIR) test -z "$(strip $(SHARED_HEADER))" || \ $(INSTALL_DATA) $(SHARED_HEADER) $(DISTDIR) test -z "$(strip $(SHARED_SOURCE))" || \ $(INSTALL_DATA) $(SHARED_SOURCE) $(DISTDIR) test -z "$(strip $(SHARED_TCL_LIB))" || \ $(INSTALL_DATA) $(SHARED_TCL_LIB) $(DISTDIR) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR) test -z "$(strip $(HELPPATCHES))" || \ $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR) test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DISTDIR)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \ done test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DISTDIR)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ done tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) # make a Debian source package dpkg-source: debclean make distclean dist mv $(DISTDIR) $(ORIGDIR) tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR) rm -f -- $(DISTDIR).tar.gz rm -rf -- $(DISTDIR) $(ORIGDIR) cd .. && dpkg-source -b $(LIBRARY_NAME) etags: etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h showsetup: @echo "CC: $(CC)" @echo "CFLAGS: $(CFLAGS)" @echo "LDFLAGS: $(LDFLAGS)" @echo "LIBS: $(LIBS)" @echo "ALL_CFLAGS: $(ALL_CFLAGS)" @echo "ALL_LDFLAGS: $(ALL_LDFLAGS)" @echo "ALL_LIBS: $(ALL_LIBS)" @echo "PD_INCLUDE: $(PD_INCLUDE)" @echo "PD_PATH: $(PD_PATH)" @echo "objectsdir: $(objectsdir)" @echo "LIBRARY_NAME: $(LIBRARY_NAME)" @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)" @echo "SOURCES: $(SOURCES)" @echo "SHARED_HEADER: $(SHARED_HEADER)" @echo "SHARED_SOURCE: $(SHARED_SOURCE)" @echo "SHARED_LIB: $(SHARED_LIB)" @echo "SHARED_TCL_LIB: $(SHARED_TCL_LIB)" @echo "PDOBJECTS: $(PDOBJECTS)" @echo "ALLSOURCES: $(ALLSOURCES)" @echo "ALLSOURCES TCL: $(wildcard $(ALLSOURCES:.c=.tcl))" @echo "UNAME: $(UNAME)" @echo "CPU: $(CPU)" @echo "pkglibdir: $(pkglibdir)" @echo "DISTDIR: $(DISTDIR)" @echo "ORIGDIR: $(ORIGDIR)" testtools-0.1/LICENSE.txt0000644000175000017500000000763011674625224015506 0ustar zmoelnigzmoelnigtesttools ---------------------------------------------------------------------------------------------------- unit test abstractions: unit-test-frame.pd unit-test-frame~.pd unit test example patches: example-unittest.pd example~-unittest.pd Katja Vetter and Fred Jan Kraan 2011 To these patches, the license terms of the employed Pd classes apply: vanilla pd ggee/getdir ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- vanilla Pd license This software is copyrighted by Miller Puckette and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------------------------------------- ggee license This software is copyrighted by Guenter Geiger and others. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. RESTRICTED RIGHTS: Use, duplication or disclosure by the government is subject to the restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software Clause as DFARS 252.227-7013 and FAR 52.227-19. testtools-0.1/README.txt0000644000175000017500000000111611674625224015352 0ustar zmoelnigzmoelnigtesttools ---------------------------------------------------------------------------------------------------- Abstractions to produce unit test patches for Pd objects. See example patches for howto. Suggestion: use uniform suffix 'unittest' in test patch names. unit test abstractions: unit-test-frame.pd unit-test-frame~.pd unit test example patches: example-unittest.pd example~-unittest.pd reference files: example.wav example~.wav Katja Vetter and Fred Jan Kraan November 2011 ----------------------------------------------------------------------------------------------------testtools-0.1/unit-test-frame.pd0000644000175000017500000004171511674625224017236 0ustar zmoelnigzmoelnig#N canvas 66 59 710 662 10; #X obj 620 302 bng 50 250 50 0 empty empty list 5 25 0 14 -203904 -262144 -1; #X obj 315 301 bng 50 250 50 0 empty empty list 5 25 0 14 -203904 -262144 -1; #X obj 100 300 bng 50 250 50 0 empty empty list 5 25 0 14 -203904 -262144 -1; #X obj 621 239 bng 50 250 50 0 empty empty ? 15 25 0 30 -260097 -262144 -1; #X obj 474 302 hsl 130 50 0 127 0 0 \$0-dummysend \$0-stddev-label STDDEV-ZERO 4 35 0 10 -203904 -203904 -1 0 1; #X floatatom 477 309 18 0 0 0 - #0-stddev -; #X obj 256 301 bng 50 250 50 0 empty empty test 5 25 0 14 -260097 -262144 -1; #X obj 40 300 bng 50 250 50 0 empty empty write 4 25 0 14 -260097 -262144 -1; #X obj 43 239 hsl 195 50 0 112 0 0 \$0-dummysend \$0-dummyreceive empty -2 -8 0 10 -203904 -203904 -203904 0 1; #X symbolatom 45 247 25 0 0 0 - #0-refname #0-dummysend; #X text 44 267 reference; #N canvas 607 182 376 522 std.deviation 0; #X obj 80 127 until; #X obj 95 155 + 1; #X obj 80 180 f; #X obj 80 99 t f b; #X msg 122 163 0; #X obj 107 310 +; #X floatatom 107 337 8 0 0 0 - - -; #X obj 92 361 f; #X text 153 163 clear sums; #X obj 52 234 == 511; #X obj 52 258 sel 1; #X obj 80 203 t f f; #X obj 107 261 t f f; #X obj 107 286 *; #X obj 92 386 / 512; #X obj 92 410 sqrt; #X obj 92 439 outlet; #X text 137 441 stddev; #X obj 186 439 s \$0-stddev; #X obj 107 233 tabread \$0-difference; #X obj 191 58 + 1; #X obj 80 75 f 512; #X floatatom 202 10 5 0 0 0 - - -; #X obj 263 -16 r \$0-test-delay; #X obj 263 30 + 10; #X floatatom 272 8 5 0 0 0 - - -; #X obj 80 47 delay 10; #X obj 191 -16 r \$0-index; #X obj 80 -16 r \$0-test-prepare; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 1 0; #X connect 2 0 11 0; #X connect 3 0 0 0; #X connect 3 1 4 0; #X connect 4 0 2 1; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 6 0 5 1; #X connect 6 0 7 1; #X connect 7 0 14 0; #X connect 9 0 10 0; #X connect 10 0 7 0; #X connect 11 0 9 0; #X connect 11 1 19 0; #X connect 12 0 13 0; #X connect 12 1 13 1; #X connect 13 0 5 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 15 0 18 0; #X connect 19 0 12 0; #X connect 20 0 14 1; #X connect 20 0 21 1; #X connect 21 0 3 0; #X connect 23 0 24 0; #X connect 23 0 25 0; #X connect 24 0 26 1; #X connect 26 0 21 0; #X connect 27 0 9 1; #X connect 27 0 20 0; #X connect 27 0 22 0; #X connect 28 0 26 0; #X restore 327 123 pd std.deviation; #X obj 39 23 inlet; #X obj 328 27 inlet; #X obj 630 22 inlet; #X obj 238 628 outlet; #X obj 286 628 outlet; #X obj 335 629 outlet; #X obj 238 555 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 288 508 const 0; #X obj 288 531 s \$0-system-under-test; #X obj 39 49 unpack s f; #X obj 96 78 s \$0-test-delay; #N canvas 568 53 379 248 table 0; #X obj 45 199 tabwrite \$0-system-under-test; #X obj 216 70 f; #X obj 245 70 + 1; #X obj 45 53 t f b; #X msg 231 45 0; #X obj 45 22 inlet; #X obj 62 172 tabwrite \$0-difference; #X obj 77 119 tabread \$0-reference; #X obj 77 87 t f f; #X obj 231 21 r \$0-test-prepare; #X obj 237 135 s \$0-index; #X obj 62 145 -; #X obj 237 108 moses 512; #X connect 1 0 2 0; #X connect 1 0 8 0; #X connect 1 0 0 1; #X connect 1 0 12 0; #X connect 2 0 1 1; #X connect 3 0 0 0; #X connect 3 0 11 0; #X connect 3 1 1 0; #X connect 4 0 1 1; #X connect 5 0 3 0; #X connect 7 0 11 1; #X connect 8 0 7 0; #X connect 8 1 6 1; #X connect 9 0 4 0; #X connect 11 0 6 0; #X connect 12 0 10 0; #X restore 328 85 pd table; #X obj 238 509 t b b b; #N canvas 0 22 256 269 view-system 0; #X obj 39 39 inlet; #X msg 39 75 arrayviewlistnew; #X obj 39 174 s \$0-system-under-test; #X obj 67 118 r \$0-test-prepare; #X msg 67 144 arrayviewclose; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X restore 351 507 pd view-system; #N canvas 695 50 264 263 view-difference 0; #X obj 39 39 inlet; #X obj 39 180 s \$0-difference; #X msg 39 75 arrayviewlistnew; #X obj 57 108 r \$0-test-prepare; #X msg 57 135 arrayviewclose; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 584 520 pd view-difference; #N canvas 453 143 231 283 view-reference 0; #X obj 27 31 inlet; #X msg 27 59 arrayviewlistnew; #X obj 27 144 s \$0-reference; #X obj 42 88 r \$0-test-prepare; #X msg 42 114 arrayviewclose; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X restore 100 507 pd view-reference; #N canvas 739 28 261 427 test-result-messages 0; #X obj 32 23 inlet; #X obj 59 310 stdout; #X obj 32 84 sel 0; #X obj 89 166 r \$0-refname; #X obj 89 193 symbol; #X obj 32 56 moses 1e-05; #X obj 32 277 t b a; #X msg 32 336 UNIT-TEST-DONE; #X obj 32 373 stdout; #X obj 32 221 pack s f s; #X obj 112 309 print unit-test; #X obj 85 373 print unit-test; #X obj 32 249 list trim; #X msg 59 113 STDDEV-SMALL \$1; #X msg 32 141 STDDEV-ZERO 0; #X msg 95 84 STDDEV-LARGE \$1; #N canvas 49 312 252 304 stddev-label 0; #X obj 40 29 inlet; #X obj 40 92 sel 0; #X obj 40 64 moses 1e-05; #X msg 103 92 STDDEV-LARGE; #X msg 67 121 STDDEV-SMALL; #X msg 40 149 STDDEV-ZERO; #X msg 40 221 label \$1; #X obj 40 191 symbol; #X obj 40 250 s \$0-stddev-label; #X connect 0 0 2 0; #X connect 1 0 5 0; #X connect 1 1 4 0; #X connect 2 0 1 0; #X connect 2 1 3 0; #X connect 3 0 7 0; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X restore 126 50 pd stddev-label; #X connect 0 0 5 0; #X connect 0 0 16 0; #X connect 2 0 14 0; #X connect 2 1 13 0; #X connect 3 0 4 0; #X connect 4 0 9 2; #X connect 5 0 2 0; #X connect 5 1 15 0; #X connect 6 0 7 0; #X connect 6 1 1 0; #X connect 6 1 10 0; #X connect 7 0 8 0; #X connect 7 0 11 0; #X connect 9 0 12 0; #X connect 12 0 6 0; #X connect 13 0 9 0; #X connect 14 0 9 0; #X connect 15 0 9 0; #X restore 327 164 pd test-result-messages; #X floatatom 203 247 5 0 0 0 - #0-test-delay -; #X text 201 269 delay; #N canvas 628 152 504 542 list-drip 0; #X obj 68 94 t a a; #X obj 68 251 spigot; #X obj 101 159 bang; #X obj 101 185 1; #X obj 207 160 route bang; #X obj 170 160 bang; #X obj 170 186 0; #X obj 101 124 list split 2; #X obj 134 348 list split; #X obj 191 297 list length; #X obj 191 319 >> 1; #X obj 68 280 t a a a a; #X obj 68 439 list split; #X obj 125 391 list length; #X obj 125 416 >> 1; #X obj 41 29 inlet; #X obj 264 186 outlet; #X text 83 29 Copyright 2009 by Mathieu Bouchard; #X obj 41 63 t b a; #X obj 328 80 outlet; #X text 383 82 signal end of list; #X text 35 502 made compatible with [list-drip]: fbar 2009; #X connect 0 0 1 0; #X connect 0 1 7 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 3 0 1 1; #X connect 4 1 16 0; #X connect 5 0 6 0; #X connect 6 0 1 1; #X connect 7 0 2 0; #X connect 7 2 4 0; #X connect 7 2 5 0; #X connect 8 0 0 0; #X connect 9 0 10 0; #X connect 10 0 8 1; #X connect 11 0 12 0; #X connect 11 1 13 0; #X connect 11 2 8 0; #X connect 11 3 9 0; #X connect 12 1 0 0; #X connect 13 0 14 0; #X connect 14 0 12 1; #X connect 15 0 18 0; #X connect 18 0 19 0; #X connect 18 1 0 0; #X restore 328 52 pd list-drip; #X obj 257 555 s \$0-test-prepare; #X obj 256 208 r \$0-do-test; #N canvas 716 407 203 281 index0-511 0; #X obj 41 49 inlet; #X obj 41 224 outlet; #X obj 41 139 until; #X msg 41 107 512; #X obj 41 169 f; #X obj 72 169 + 1; #X obj 41 79 t b b; #X msg 80 139 0; #X connect 0 0 6 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 4 0 1 0; #X connect 5 0 4 1; #X connect 6 0 3 0; #X connect 6 1 7 0; #X connect 7 0 4 1; #X restore 335 605 pd index0-511; #X obj 43 371 hsl 195 100 0 127 0 0 empty empty empty -2 -8 0 10 -203904 -203904 -1 0 1; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-reference 512 float 0; #X coords 0 1 511 -1 200 100 1; #X restore 40 371 graph; #X obj 473 371 hsl 195 100 0 127 0 0 empty empty empty -2 -8 0 10 -203904 -203904 -1 0 1; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-difference 512 float 0; #X coords 0 1 511 -1 200 100 1; #X restore 470 371 graph; #X obj 258 371 hsl 195 100 0 127 0 0 empty empty empty -2 -8 0 10 -203904 -203904 -1 0 1; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-system-under-test 512 float 0; #X coords 0 1 511 -1 200 100 1; #X restore 255 371 graph; #X obj 256 239 bng 50 250 50 0 \$0-dummysend \$0-dummyreceive empty 17 7 0 10 -203904 -204786 -203904; #X obj 256 239 bng 50 1000 50 0 \$0-dummysend \$0-dummyreceive done 7 25 0 14 -203904 -1 -203904; #X text 588 21 dummy; #X text 73 23 reference name + delay; #X text 367 25 floats & lists; #X text 40 481 test-bang out; #X text 589 481 test-bang out; #X text 405 481 index 0 - 511 out; #X obj 467 237 cnv 15 100 20 empty empty [unit-test-frame] 2 12 0 14 -262144 -66577 0; #X msg 540 520 vis 1; #X obj 540 548 s pd-info-unit-test\$0; #N canvas 473 125 566 541 info-unit-test\$0 0; #X text 144 474 STDDEV-ZERO 0; #X text 144 516 STDDEV-LARGE ; #X text 144 494 STDDEV-SMALL ; #X text 296 495 when standard deviation < 1e-05; #X text 296 516 when standard deviation >= 1e-05; #X text 296 474 when standard deviation = 0; #X text 129 46 ------------------------------------------------------------ ; #X text 127 378 ------------------------------------------------------------ ; #X text 126 538 ------------------------------------------------------------ ; #X text 131 808 Katja Vetter & Fred Jan Kraan \, October 2011; #X text 127 556 The reference file must be in the same directory as the test. If it is not found when the patch is loaded \, an error is reported to the Pd window and stdout:; #X text 122 821 ------------------------------------------------------------ ; #X text 129 67 1: Test arguments must be sent as a list into the first inlet:; #X text 149 606 REFERENCE-FILE-ERROR reference file not found: ; #X text 128 398 The test is automatically executed when the patch is loaded \, and can also be started with button 'test'. Difference between signal under test and reference is graphed \, and standard deviation is computed. A test result message is sent to the Pd window and stdout: ; #X text 124 779 ------------------------------------------------------------ ; #X text 26 19 arguments; #X obj 29 39 loadbang; #X obj 32 407 bng 50 250 50 0 empty empty test 5 25 0 14 -260097 -262144 -1; #X obj 33 555 bng 50 250 50 0 empty empty write 4 25 0 14 -260097 -262144 -1; #X text 124 714 ------------------------------------------------------------ ; #X obj 29 94 loadbang; #X text 130 98 - reference name \, matching the name of the test patch ; #X text 130 22 how to use [unit-test-frame.pd] in unit test patches ; #X msg 29 66 sqrt 0; #X msg 29 121 pipe 100; #X text 130 116 - delaytime between test trigger and test snapshot. ; #X text 129 137 2: Messages from the object(s) under test must be sent into the second inlet. Floats and lists are both accepted. When testing an external object \, consider instantiating it with namespace \, like [zexy/wrap].; #X text 127 631 A reference file can be created from the content of \$0-signal-under-test \, using a Pd which is known to work well (the latest release). Use button 'write'. The file will have 512 samples in 32 bit .wav format. Even though the test output is not a signal \, this is a good format to write.; #X text 130 203 Use a bang from one of [unit-test-frame.pd] outlets to trigger the object(s) when the test starts. Or use the index 0 - 511 outlet to generate a series of output values.; #X text 131 255 Normalization of the object output (within interval 0 to 1 or -1 to 1) is useful. It gives a good graph and a meaningful stddev. Also note that large numbers are unprecise. Example: the difference between 1e+12 in single precision and 1e+12 in double precision is 27968! Try this on:; #X text 149 345 http://www.h-schmidt.net/FloatApplet/IEEE754.html; #X text 124 733 Apart from [ggee/getdir] \, [unit-test-frame.pd] uses only vanilla Pd classes. For testing external classes \, consider using namespaces like in [zexy/wrap].; #X connect 17 0 24 0; #X connect 21 0 25 0; #X restore 555 165 pd info-unit-test\$0; #X obj 428 531 s \$0-difference; #X obj 384 629 outlet; #X obj 238 577 t b b b b; #X text 209 481 test-bang out; #X obj 39 183 s \$0-refname; #X obj 39 74 symbol; #N canvas 673 76 412 506 load-reference 0; #X obj 36 27 inlet; #X obj 36 203 soundfiler; #X obj 81 112 f \$0; #X obj 36 136 pack s f; #X obj 36 94 t a b; #X obj 36 461 s \$0-do-test; #X obj 75 375 pack s s s s s s; #X obj 168 297 r \$0-refname; #X obj 75 432 stdout; #X obj 36 235 sel 512; #X obj 36 60 spigot 1; #X msg 81 27 0; #X text 119 29 at load \, try to read reference file and do test; #X msg 75 271 REFERENCE-FILE-ERROR reference file not found:; #X msg 168 324 \$1.wav; #X obj 168 349 symbol; #X obj 75 402 list trim; #X obj 127 432 print unit-test; #X msg 125 135 read ./\$1.wav \$2-reference; #X msg 36 173 read \$1.wav \$2-reference; #X connect 0 0 10 0; #X connect 1 0 9 0; #X connect 2 0 3 1; #X connect 3 0 19 0; #X connect 4 0 3 0; #X connect 4 1 2 0; #X connect 6 0 16 0; #X connect 7 0 14 0; #X connect 9 0 5 0; #X connect 9 1 13 0; #X connect 10 0 4 0; #X connect 10 0 11 0; #X connect 11 0 10 1; #X connect 13 0 6 0; #X connect 14 0 15 0; #X connect 15 0 6 5; #X connect 16 0 8 0; #X connect 16 0 17 0; #X connect 19 0 1 0; #X restore 58 155 pd load-reference; #N canvas 405 322 429 358 prepend-path 0; #X obj 21 13 inlet; #X obj 48 131 ggee/getdir 2; #X obj 48 104 t b a; #X obj 21 283 spigot 1; #X msg 66 235 0; #X obj 21 45 t a a; #X obj 21 169 pack s s; #X msg 21 200 \$1/\$2; #X msg 102 235 1; #X obj 102 266 pipe 100; #X obj 21 314 outlet; #X text 76 11 Try to prepend absolute path of the abstraction's parent. If [ggee/getdir] is not present \, the path is relative to the abstraction. ; #X msg 21 75 .; #X connect 0 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 2 1 6 1; #X connect 3 0 4 0; #X connect 3 0 8 0; #X connect 3 0 10 0; #X connect 4 0 3 1; #X connect 5 0 12 0; #X connect 5 1 2 0; #X connect 6 0 7 0; #X connect 7 0 3 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 12 0 6 0; #X restore 58 101 pd prepend-path; #X obj 71 130 s \$0-refpath; #N canvas 240 70 389 572 write-reference 1; #X obj 51 436 soundfiler; #X obj 51 379 list; #X obj 50 16 inlet; #X floatatom 82 470 5 0 0 0 - - -; #X text 90 16 bang; #X obj 51 124 r \$0-do-write-reference; #X obj 143 152 r \$0-abort-write-reference; #X obj 51 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 51 532 s \$0-do-test; #X obj 72 153 delay 500; #X msg 257 46 \$1.wav; #X obj 257 71 symbol; #X obj 257 99 s \$0-ref-wav-name; #N canvas 574 380 410 288 write-reference-popup\$0 0; #X obj 97 197 bng 60 400 50 0 \$0-do-write-reference empty continue 2 28 0 12 -260097 -262144 -1; #X obj 231 197 bng 60 300 50 0 \$0-abort-write-reference empty abort 8 28 0 12 -204786 -262144 -1; #X obj 29 67 hsl 350 100 0 127 0 0 \$0-dummysend \$0-dummyreceive empty -2 -8 0 10 -262144 -262144 -1 0 1; #X symbolatom 33 85 30 0 0 0 - #0-refname #0-dummysend; #X symbolatom 33 127 30 0 0 0 - #0-ref-wav-name #0-dummysend; #X text 31 67 reference name:; #X text 31 108 file name:; #X text 24 11 This action will overwrite your reference .wav file with the content of \$0-signal-under-test. The action can not be undone! ; #X restore 51 95 pd write-reference-popup\$0; #X obj 50 68 s pd-write-reference-popup\$0; #X msg 50 43 vis 1; #X obj 72 230 s pd-write-reference-popup\$0; #X msg 72 205 vis 0; #X obj 143 177 delay 200; #X obj 72 264 r \$0-refpath; #X obj 72 292 t a b; #X obj 99 321 f \$0; #X obj 72 350 pack s f; #X msg 51 407 write -wave -bytes 4 \$1 \$2-system-under-test; #X obj 257 20 r \$0-refname; #N canvas 0 22 282 435 copy-to-reference 0; #X obj 36 50 inlet; #X msg 36 105 512; #X obj 36 136 until; #X obj 36 198 f; #X obj 68 198 + 1; #X obj 36 80 t b b; #X msg 51 169 0; #X obj 55 270 tabread \$0-system-under-test; #X obj 55 307 tabwrite \$0-reference; #X obj 36 332 == 511; #X obj 36 236 t f f f; #X obj 36 363 outlet; #X connect 0 0 5 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 10 0; #X connect 4 0 3 1; #X connect 5 0 1 0; #X connect 5 1 6 0; #X connect 6 0 3 1; #X connect 7 0 8 0; #X connect 9 0 11 0; #X connect 10 0 9 0; #X connect 10 1 7 0; #X connect 10 2 8 1; #X restore 51 499 pd copy-to-reference; #X connect 0 0 3 0; #X connect 0 0 7 0; #X connect 1 0 23 0; #X connect 2 0 15 0; #X connect 5 0 1 0; #X connect 5 0 9 0; #X connect 6 0 18 0; #X connect 7 0 25 0; #X connect 9 0 17 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 15 0 14 0; #X connect 17 0 16 0; #X connect 18 0 17 0; #X connect 19 0 20 0; #X connect 20 0 22 0; #X connect 20 1 21 0; #X connect 21 0 22 1; #X connect 22 0 1 1; #X connect 23 0 0 0; #X connect 24 0 10 0; #X connect 25 0 8 0; #X restore 39 208 pd write-reference; #X connect 0 0 26 0; #X connect 1 0 25 0; #X connect 2 0 27 0; #X connect 3 0 50 0; #X connect 6 0 24 0; #X connect 7 0 62 0; #X connect 11 0 28 0; #X connect 11 0 42 0; #X connect 12 0 21 0; #X connect 13 0 31 0; #X connect 18 0 55 0; #X connect 19 0 20 0; #X connect 19 0 53 0; #X connect 21 0 58 0; #X connect 21 1 22 0; #X connect 24 0 18 0; #X connect 24 1 32 0; #X connect 24 2 19 0; #X connect 31 0 23 0; #X connect 33 0 6 0; #X connect 34 0 17 0; #X connect 50 0 51 0; #X connect 55 0 15 0; #X connect 55 1 16 0; #X connect 55 2 34 0; #X connect 55 3 54 0; #X connect 58 0 57 0; #X connect 58 0 60 0; #X connect 60 0 59 0; #X connect 60 0 61 0; #X coords 0 -1 1 1 650 270 2 30 230; testtools-0.1/unit-test-frame~-help.pd0000644000175000017500000000041411674625224020351 0ustar zmoelnigzmoelnig#N canvas 211 94 724 463 10; #X text 37 29 [unit-test-frame~] is an abstraction which helps you create a unit test patch for a signal object. For an example how to use it \, click:; #X obj 122 97 pddplink examples/example~-unittest.pd; #X obj 40 169 unit-test-frame~; testtools-0.1/unit-test-frame~.pd0000644000175000017500000003502011674625224017424 0ustar zmoelnigzmoelnig#N canvas 61 63 724 590 10; #N canvas 654 121 435 584 write-reference 0; #X obj 51 436 soundfiler; #X obj 51 379 list; #X obj 50 16 inlet; #X floatatom 82 470 5 0 0 0 - - -; #X text 90 16 bang; #X obj 51 124 r \$0-do-write-reference; #X obj 143 152 r \$0-abort-write-reference; #X obj 51 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 241 538 s \$0-do-test; #X obj 70 500 tabplay~ \$0-signal-under-test; #X msg 51 407 write -wave -bytes 4 \$1 \$2-signal-under-test; #X obj 51 542 tabwrite~ \$0-reference; #X obj 72 153 delay 500; #X obj 257 20 r \$0-refname; #X msg 257 46 \$1.wav; #X obj 257 71 symbol; #X obj 257 99 s \$0-ref-wav-name; #N canvas 682 430 395 255 write-reference-popup\$0 0; #X obj 88 174 bng 60 400 50 0 \$0-do-write-reference empty continue 2 28 0 12 -260097 -262144 -1; #X obj 234 174 bng 60 300 50 0 \$0-abort-write-reference empty abort 8 28 0 12 -204786 -262144 -1; #X obj 91 67 hsl 200 80 0 127 0 0 \$0-dummysend \$0-dummyreceive empty -2 -8 0 10 -262144 -262144 -1 0 1; #X symbolatom 95 85 30 0 0 0 - #0-refname #0-dummysend; #X symbolatom 95 125 30 0 0 0 - #0-ref-wav-name #0-dummysend; #X text 93 67 reference name:; #X text 93 108 file name:; #X text 24 11 This action will overwrite your reference .wav file with the content of \$0-signal-under-test. The action can not be undone! ; #X restore 51 95 pd write-reference-popup\$0; #X obj 50 68 s pd-write-reference-popup\$0; #X msg 50 43 vis 1; #X obj 72 230 s pd-write-reference-popup\$0; #X msg 72 205 vis 0; #X obj 143 177 delay 200; #X obj 72 264 r \$0-refpath; #X obj 72 292 t a b; #X obj 99 321 f \$0; #X obj 72 350 pack s f; #X connect 0 0 3 0; #X connect 0 0 7 0; #X connect 1 0 10 0; #X connect 2 0 19 0; #X connect 5 0 1 0; #X connect 5 0 12 0; #X connect 6 0 22 0; #X connect 7 0 9 0; #X connect 7 0 11 0; #X connect 9 0 11 0; #X connect 9 1 8 0; #X connect 10 0 0 0; #X connect 12 0 21 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 19 0 18 0; #X connect 21 0 20 0; #X connect 22 0 21 0; #X connect 23 0 24 0; #X connect 24 0 26 0; #X connect 24 1 25 0; #X connect 25 0 26 1; #X connect 26 0 1 1; #X restore 43 219 pd write-reference; #X obj 42 319 bng 50 250 50 0 empty empty write 4 25 0 14 -260097 -262144 -1; #X obj 255 318 bng 50 250 50 0 empty empty test 5 25 0 14 -260097 -262144 -1; #N canvas 0 22 324 199 record-test&diff 0; #X obj 34 18 inlet~; #X obj 80 83 -~; #X obj 229 158 outlet; #X obj 224 19 inlet; #X text 262 18 bang; #X text 76 19 signal under test; #X obj 34 157 tabwrite~ \$0-signal-under-test; #X obj 80 114 tabwrite~ \$0-difference; #X obj 95 53 tabplay~ \$0-reference; #X connect 0 0 6 0; #X connect 0 0 1 0; #X connect 1 0 7 0; #X connect 3 0 6 0; #X connect 3 0 8 0; #X connect 3 0 7 0; #X connect 8 0 1 1; #X connect 8 1 2 0; #X restore 255 88 pd record-test&diff; #N canvas 45 41 288 479 std.deviation 0; #X obj 83 46 until; #X obj 98 74 + 1; #X obj 83 99 f; #X obj 83 18 t f b; #X msg 159 82 0; #X msg 83 -8 512; #X obj 110 229 +; #X floatatom 110 256 8 0 0 0 - - -; #X obj 95 280 f; #X text 159 61 clear sums; #X obj 55 153 == 511; #X obj 55 177 sel 1; #X obj 83 122 t f f; #X obj 83 -34 inlet; #X obj 110 180 t f f; #X obj 110 205 *; #X obj 95 302 / 512; #X obj 95 329 sqrt; #X text 122 -32 bang; #X obj 95 358 outlet; #X text 140 360 stddev; #X obj 189 358 s \$0-stddev; #X obj 110 152 tabread \$0-difference; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 1 0; #X connect 2 0 12 0; #X connect 3 0 0 0; #X connect 3 1 4 0; #X connect 4 0 2 1; #X connect 4 0 6 1; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 6 1; #X connect 7 0 8 1; #X connect 8 0 16 0; #X connect 10 0 11 0; #X connect 11 0 8 0; #X connect 12 0 10 0; #X connect 12 1 22 0; #X connect 13 0 5 0; #X connect 14 0 15 0; #X connect 14 1 15 1; #X connect 15 0 6 0; #X connect 16 0 17 0; #X connect 17 0 19 0; #X connect 17 0 21 0; #X connect 22 0 14 0; #X restore 255 113 pd std.deviation; #N canvas 346 419 376 223 check-samplerate 0; #X obj 96 53 samplerate~; #X obj 96 85 == 44100; #X obj 96 21 loadbang; #X obj 96 119 sel 0; #X obj 33 182 outlet; #X obj 141 182 stdout; #X obj 96 182 print; #X obj 33 20 inlet; #X obj 33 150 spigot; #X msg 96 150 SAMPLE-RATE-ERROR samplerate must be 44100; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 1 0 8 1; #X connect 2 0 0 0; #X connect 3 0 9 0; #X connect 7 0 8 0; #X connect 8 0 4 0; #X connect 9 0 5 0; #X connect 9 0 6 0; #X restore 255 137 pd check-samplerate; #X msg 619 125 \; pd dsp 1; #X obj 619 95 loadbang; #X obj 29 188 s \$0-refname; #X obj 472 390 hsl 195 100 0 127 0 0 empty empty empty -2 -8 0 10 -204786 -204786 -1 0 1; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-difference 512 float 0; #X coords 0 1 511 -1 200 100 1; #X restore 469 390 graph; #X obj 258 390 hsl 195 100 0 127 0 0 empty empty empty -2 -8 0 10 -204786 -204786 -1 0 1; #X obj 44 390 hsl 195 100 0 127 0 0 empty empty empty -2 -8 0 10 -204786 -204786 -1 0 1; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-reference 512 float 0; #X coords 0 1 511 -1 200 100 1; #X restore 41 390 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-signal-under-test 512 float 0; #X coords 0 1 511 -1 200 100 1; #X restore 255 390 graph; #X obj 294 550 outlet; #X obj 267 518 t b b; #N canvas 739 28 261 427 test-result-messages 0; #X obj 32 23 inlet; #X obj 59 310 stdout; #X obj 32 84 sel 0; #X obj 89 166 r \$0-refname; #X obj 89 193 symbol; #X obj 32 56 moses 1e-05; #X obj 32 277 t b a; #X msg 32 336 UNIT-TEST-DONE; #X obj 32 373 stdout; #X obj 32 221 pack s f s; #X obj 112 309 print unit-test; #X obj 85 373 print unit-test; #X obj 32 249 list trim; #X msg 59 113 STDDEV-SMALL \$1; #X msg 32 141 STDDEV-ZERO 0; #X msg 95 84 STDDEV-LARGE \$1; #N canvas 49 312 252 304 stddev-label 0; #X obj 40 29 inlet; #X obj 40 92 sel 0; #X obj 40 64 moses 1e-05; #X msg 103 92 STDDEV-LARGE; #X msg 67 121 STDDEV-SMALL; #X msg 40 149 STDDEV-ZERO; #X msg 40 221 label \$1; #X obj 40 191 symbol; #X obj 40 250 s \$0-stddev-label; #X connect 0 0 2 0; #X connect 1 0 5 0; #X connect 1 1 4 0; #X connect 2 0 1 0; #X connect 2 1 3 0; #X connect 3 0 7 0; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X restore 126 50 pd stddev-label; #X connect 0 0 5 0; #X connect 0 0 16 0; #X connect 2 0 14 0; #X connect 2 1 13 0; #X connect 3 0 4 0; #X connect 4 0 9 2; #X connect 5 0 2 0; #X connect 5 1 15 0; #X connect 6 0 7 0; #X connect 6 1 1 0; #X connect 6 1 10 0; #X connect 7 0 8 0; #X connect 7 0 11 0; #X connect 9 0 12 0; #X connect 12 0 6 0; #X connect 13 0 9 0; #X connect 14 0 9 0; #X connect 15 0 9 0; #X restore 255 162 pd test-result-messages; #X text 232 549 test-bang; #X obj 472 318 hsl 130 50 0 127 0 0 \$0-dummysend \$0-stddev-label STDDEV-ZERO 4 35 0 10 -204786 -204786 -1 0 1; #X obj 618 257 bng 50 250 50 0 empty empty ? 15 25 0 30 -260097 -262144 -1; #X floatatom 475 325 18 0 0 0 - #0-stddev -; #X obj 29 68 symbol; #X obj 45 258 hsl 195 50 0 112 0 0 \$0-dummysend \$0-dummyreceive empty -2 -8 0 10 -204786 -204786 -1 0 1; #X symbolatom 47 266 25 0 0 0 - #0-refname #0-dummysend; #X obj 255 217 r \$0-do-test; #X obj 255 258 bng 50 250 50 0 \$0-dummysend \$0-dummyreceive empty 17 7 0 10 -262144 -204786 -1; #X obj 255 258 bng 50 1000 50 0 \$0-dummysend \$0-dummyreceive done 7 25 0 14 -204786 -1 -204786; #X obj 105 319 bng 50 250 50 0 empty empty list 5 25 0 14 -204786 -262144 -1; #N canvas 0 22 254 177 view-difference 0; #X obj 39 39 inlet; #X obj 39 112 s \$0-difference; #X msg 39 75 arrayviewlistnew; #X connect 0 0 2 0; #X connect 2 0 1 0; #X restore 584 512 pd view-difference; #N canvas 453 143 247 130 view-reference 0; #X obj 27 31 inlet; #X obj 27 86 s \$0-reference; #X msg 27 59 arrayviewlistnew; #X connect 0 0 2 0; #X connect 2 0 1 0; #X restore 105 515 pd view-reference; #N canvas 0 22 268 168 view-signal 0; #X obj 39 39 inlet; #X obj 39 108 s \$0-signal-under-test; #X msg 39 75 arrayviewlistnew; #X connect 0 0 2 0; #X connect 2 0 1 0; #X restore 319 518 pd view-signal; #X obj 341 550 outlet; #X obj 388 550 outlet; #X obj 366 58 delay; #X obj 255 14 inlet~; #X obj 29 13 inlet; #X obj 630 17 inlet; #X obj 29 41 unpack s f; #X obj 618 318 bng 50 250 50 0 empty empty list 5 25 0 14 -204786 -262144 -1; #X obj 319 318 bng 50 250 50 0 empty empty list 5 25 0 14 -204786 -262144 -1; #X floatatom 205 266 5 0 0 0 - #0-test-delay -; #X text 46 286 reference; #X text 202 286 delay; #X obj 86 73 s \$0-test-delay; #X text 557 18 dummy inlet; #X text 300 12 signal under test; #X obj 463 257 cnv 15 150 25 empty empty [unit-test-frame~] 2 12 0 14 -262144 -1 0; #N canvas 673 76 412 506 load-reference 0; #X obj 36 27 inlet; #X obj 36 203 soundfiler; #X obj 81 112 f \$0; #X obj 36 136 pack s f; #X obj 36 94 t a b; #X obj 36 461 s \$0-do-test; #X obj 75 375 pack s s s s s s; #X obj 168 297 r \$0-refname; #X obj 75 432 stdout; #X obj 36 235 sel 512; #X obj 36 60 spigot 1; #X msg 81 27 0; #X text 119 29 at load \, try to read reference file and do test; #X msg 75 271 REFERENCE-FILE-ERROR reference file not found:; #X msg 168 324 \$1.wav; #X obj 168 349 symbol; #X obj 75 402 list trim; #X obj 127 432 print unit-test; #X msg 125 135 read ./\$1.wav \$2-reference; #X msg 36 173 read \$1.wav \$2-reference; #X connect 0 0 10 0; #X connect 1 0 9 0; #X connect 2 0 3 1; #X connect 3 0 19 0; #X connect 4 0 3 0; #X connect 4 1 2 0; #X connect 6 0 16 0; #X connect 7 0 14 0; #X connect 9 0 5 0; #X connect 9 1 13 0; #X connect 10 0 4 0; #X connect 10 0 11 0; #X connect 11 0 10 1; #X connect 13 0 6 0; #X connect 14 0 15 0; #X connect 15 0 6 5; #X connect 16 0 8 0; #X connect 16 0 17 0; #X connect 19 0 1 0; #X restore 48 159 pd load-reference; #N canvas 473 125 566 541 info-unit-test\$0 0; #X text 144 337 STDDEV-ZERO 0; #X text 144 379 STDDEV-LARGE ; #X text 144 357 STDDEV-SMALL ; #X text 296 358 when standard deviation < 1e-05; #X text 296 379 when standard deviation >= 1e-05; #X text 296 337 when standard deviation = 0; #X text 130 22 how to use [unit-test-frame~.pd] in unit test patches ; #X text 129 46 ------------------------------------------------------------ ; #X text 127 241 ------------------------------------------------------------ ; #X text 126 407 ------------------------------------------------------------ ; #X text 131 769 Katja Vetter & Fred Jan Kraan \, October 2011; #X text 125 672 ------------------------------------------------------------ ; #X text 127 421 The reference file must be in the same directory as the test. If it is not found when the patch is loaded \, an error is reported to the Pd window and stdout:; #X text 122 782 ------------------------------------------------------------ ; #X text 129 67 1: Test arguments must be sent as a list into the first inlet:; #X text 130 116 - delaytime between test trigger and test snapshot \, for example to exclude overshoot and ripple from the test.; #X text 149 471 REFERENCE-FILE-ERROR reference file not found: ; #X text 150 648 SAMPLE-RATE-ERROR samplerate must be 44100; #X text 128 261 The test is automatically executed when the patch is loaded \, and can also be started with button 'test'. Difference between signal under test and reference is graphed \, and standard deviation is computed. A test result message is sent to the Pd window and stdout: ; #X text 127 496 A reference file can be created from the content of \$0-signal-under-test \, using a Pd which is known to work well (the latest release). Use button 'write'. The file will have 512 samples in 32 bit .wav format.; #X text 126 592 The samplerate norm for [unit-test-frame~.pd] is 44100 Hz. If a different samplerate is detected when the test patch is loaded \, an error is reported to the Pd window and stdout:; #X text 124 740 ------------------------------------------------------------ ; #X msg 29 66 osc~440 0; #X text 26 19 arguments; #X obj 29 39 loadbang; #X obj 32 270 bng 50 250 50 0 empty empty test 5 25 0 14 -260097 -262144 -1; #X obj 38 424 bng 50 250 50 0 empty empty write 4 25 0 14 -260097 -262144 -1; #X text 123 564 ------------------------------------------------------------ ; #X obj 29 94 loadbang; #X msg 29 121 bp~ 200; #X text 129 204 Use a bang from one of [unit-test-frame~.pd] outlets to reset a phase etc. when the test starts.; #X text 130 98 - reference name \, matching the name of the test patch ; #X text 129 155 2: The signal under test must be sent into the second inlet. When testing an external object \, consider instantiating it with namespace \, like [zexy/wrap].; #X text 127 692 Apart from [ggee/getdir] \, [unit-test-frame~.pd] uses only vanilla Pd classes. For testing external classes \, consider using namespaces like in [zexy/wrap].; #X connect 24 0 22 0; #X connect 28 0 29 0; #X restore 488 96 pd info-unit-test\$0; #X msg 538 512 vis 1; #X text 337 215 auto-test (after loading / writing reference); #X obj 539 541 s pd-info-unit-test\$0; #X obj 321 258 hsl 130 50 0 1 0 0 \$0-audiolevel \$0-dummyreceive listen 88 35 0 10 -204786 -258113 -1 0 0; #X floatatom 411 266 5 0 0 0 - #0-audiolevel #0-dummysend; #N canvas 0 22 193 209 listen 0; #X obj 47 22 inlet~; #X obj 68 52 r \$0-audiolevel; #X obj 47 161 dac~; #X obj 47 88 *~ 0; #X obj 47 124 clip~ -1 1; #X connect 0 0 3 0; #X connect 1 0 3 1; #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 4 0 2 1; #X restore 276 63 pd listen; #N canvas 405 322 429 358 prepend-path 0; #X obj 21 13 inlet; #X obj 48 131 ggee/getdir 2; #X obj 48 104 t b a; #X obj 21 283 spigot 1; #X msg 66 235 0; #X obj 21 45 t a a; #X obj 21 169 pack s s; #X msg 21 200 \$1/\$2; #X msg 102 235 1; #X obj 102 266 pipe 100; #X obj 21 314 outlet; #X text 76 11 Try to prepend absolute path of the abstraction's parent. If [ggee/getdir] is not present \, the path is relative to the abstraction. ; #X msg 21 75 .; #X connect 0 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 2 1 6 1; #X connect 3 0 4 0; #X connect 3 0 8 0; #X connect 3 0 10 0; #X connect 4 0 3 1; #X connect 5 0 12 0; #X connect 5 1 2 0; #X connect 6 0 7 0; #X connect 7 0 3 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 12 0 6 0; #X restore 48 105 pd prepend-path; #X text 68 13 reference name + delay; #X obj 64 132 s \$0-refpath; #X connect 1 0 0 0; #X connect 2 0 16 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 17 0; #X connect 7 0 6 0; #X connect 16 0 34 0; #X connect 16 1 15 0; #X connect 16 1 32 0; #X connect 16 1 33 0; #X connect 20 0 50 0; #X connect 22 0 8 0; #X connect 22 0 56 0; #X connect 25 0 2 0; #X connect 28 0 30 0; #X connect 34 0 3 1; #X connect 34 0 27 0; #X connect 35 0 3 0; #X connect 35 0 55 0; #X connect 36 0 38 0; #X connect 38 0 22 0; #X connect 38 1 34 1; #X connect 38 1 44 0; #X connect 39 0 29 0; #X connect 40 0 31 0; #X connect 50 0 52 0; #X connect 56 0 58 0; #X connect 56 0 48 0; #X coords 0 -1 1 1 650 250 2 30 250; testtools-0.1/examples/0000755000175000017500000000000012573620142015464 5ustar zmoelnigzmoelnigtesttools-0.1/examples/example~-unittest.pd0000644000175000017500000000223311674625224021526 0ustar zmoelnigzmoelnig#N canvas 81 36 714 575 10; #X declare -path ../; #X declare -stdpath extra/testtools/; #X obj 37 297 unit-test-frame~; #X obj 333 113 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 0; #X msg 421 146 0; #X obj 358 176 phasor~ 440; #X obj 358 203 -~ 0.5; #X obj 358 233 bp~ 220 1; #X text 354 119 system under test; #X obj 25 115 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 37 204 loadbang; #X text 35 158 1 - reference name; #X text 35 177 2 - test delay in ms; #X text 34 138 test arguments (list):; #X text 480 273 More info behind the question mark; #X text 332 79 Use a bang from one of [unit-test-frame~] outlets to reset phase at test start.; #X text 23 16 When testing objects with a memory \, like an IIR filter \, set a non-zero delay time (between test trigger and test snapshot). This is needed to get the same test result every time \, independent of the signal input history.; #X msg 37 233 example~ 200; #X obj 486 16 declare -path ../; #X obj 486 45 declare -stdpath extra/testtools/; #X connect 0 2 2 0; #X connect 2 0 3 1; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 0 1; #X connect 8 0 15 0; #X connect 15 0 0 0; testtools-0.1/examples/example.wav0000644000175000017500000000405411674625224017650 0ustar zmoelnigzmoelnigRIFF$WAVEfmt D data5==qĜ==b=׳=Qw=>>>>q>++#>S)>oE/>5>(:>@>BE>bJ>:bO>CT>Y>׳]>0Fb>Zf>&k>Qwo>js>w>{>>>{>݅>Ç> >|>N>>>v>`>>ʗ>tw>2 >qĜ>Ud>>>++>纤>F>6ϧ>S>Pժ>ES>ͭ>oE>̹> +>|>>m>uӷ>6>(>>P>y>>(T>>>B>>>>b>>e>E%>:b>N>> >C>uw>>>>5>a>w>׳>>>#>0F>g>>>Z>>>P>&><>Q>e>Qw>b>>>>j>>>>>>>@>>r>>>???}??y?4?t?{?ol??b??W??J??/<?=?+ ? ? ?g ?r ?| ?^ ?Af ? ?N ? ? 6??? ??q??S?V?4?v??A?)?`??<?????]??5?Z? ?tw??eL?o?2 ???[?q?,???Ud??2?y? ?Ff ?J ?2!?!?!?a"?"?++#?u#?#?SW$?$?>%?Z%?;%?F&?M&? '?wm'?6'?0(? (?(?S)?)?*?Mu*?P*?5+?+?+?ES,?>,?-?o-?-?,.?.?.?oE/?Т/?0?\0?̹0?j1?r1?1? +2?2?2?,>3?|3?3?O4?Z4?5?__5?5?6?m6?O6? 7??z7?u7?,8?`8?8?69?9?89?E?:?(:?:?sF;?۝;?;?2L?y>?T>? U????@?BU@?_@?V@?(TA?ըA?\A?QB?B?B? NC?ߡC?C?ID?~D?D?BE?ޕE?E?q;F?F?yF?2G?G?G?(H?zH?dH?I?SoI?I?J?bJ?J?jK?UK?K?K?:FL?_L?eL?K6M?M?M?E%N?tN?N?*O?:bO?,O?P?NP?NP?P?&:Q?fQ?Q?$R?xrR?DR? S?[S?S?WS?CT?T?T?*U?uwU?'U?V?;]V?V?V? BW?W?W?%X?qX?NX?Y?ITY?Y?Y?5Z?Z?Z?[?a[?([?[? A\?w\?\?]?i]?׳]?]?sG^?^?^?&$_?m_?϶_?`?I`?`?`?#a?la?1a?a?0Fb?b?b?c?gc?c?c?>d?d?;d?e?E]e?e?e?.3f?Ozf?Zf?Pg?/Og?g?g?M#h?ih?Jh?h?q?q?r?\cr?r?fr?-s?&qs?js?s?:t?}t?t?u?~Fu?Au?u?v?Qv?v?v?Zw?Zw?Ӝw?w?!x?cx?x?x?(y?Rjy?y?y?/z?pz?z?@z?4{?u{?Ѷ{?{?8|?y|?|?r|?-<}?|}?r}?}?u>~?~~?7~?~?????testtools-0.1/examples/example-unittest.pd0000644000175000017500000000173411674625224021335 0ustar zmoelnigzmoelnig#N canvas 406 86 746 629 10; #X declare -path ../; #X declare -stdpath extra/testtools/; #X obj 53 300 unit-test-frame; #X obj 26 104 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 34 143 1 - reference name; #X text 34 162 2 - test delay in ms; #X text 33 123 test arguments (list):; #X obj 53 197 loadbang; #X obj 359 106 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 374 200 sqrt; #X obj 374 156 / 512; #X text 495 278 more info behind the question mark; #X text 358 18 Optionally use index 0 - 511 to get a series of outputs from the object or system under test.; #X text 416 155 normalization; #X text 394 112 system under test; #X text 358 52 Normalizing the object output is recommendable \, as it makes stddev more meaningful.; #X msg 53 226 example 0; #X obj 28 19 declare -path ../; #X obj 28 51 declare -stdpath extra/testtools/; #X connect 0 2 8 0; #X connect 5 0 14 0; #X connect 7 0 0 1; #X connect 8 0 7 0; #X connect 14 0 0 0; testtools-0.1/examples/example~.wav0000644000175000017500000000405411674625224020046 0ustar zmoelnigzmoelnigRIFF$WAVEfmt D dataiXyLg~SK :^JsЅx$ Z 䀾)}xWrl\e ^ULfCAS9.y#= y hoǽ]΍f_^!Fļŭ=^>+>?>"R>5f>z>i>>a>C>ڪ>jů>"> > >>+>KR>>է>]>10>!`>>!>C{>Wj>,gX>"E>3>>è >=n= }=M=|=%/=ӻ<^C;Z59D]*:?}{➽Y P۽$ &i"c.9&BL`Te[ؙbchmqYu&x y&zTG{zyw-tQqm_3hǗbM\YUþM&Eؤ<-3n )RHX:ݽ½WT/[f>ü !;K<1$=ԯi==}ǻ=`"=>=>16(>k;>N>Db>M[v>!3>O>؁>^͡>1Q>E+>x>T>;۲>x%>L>Rh>ۏ>*٤>YY>$>:N>>_>Yju>d>R>?>,>ҥ>6O>(=ɾ=e=b=j=^8nlMswzt}xBld"~|-z$vmr|mgZaZRJA$F8^2.g#jX 'W$Z̽*ɔEo2"UVƏ5;u<=^V=(~=yJ==X=>$#>$6>,J>`]>q>B߂>>/>3|>>۪>)>>l>3د>>>C>>&>ٖ>>:>/>Zp>4|_>M>;>7(>>a>==ώ=zP==>c<vψ oe! mӽ/a j!-8!CuMV^Mf lrw&|?  BEpŕ!ɀ~G{ wrwl&f+_/WFOTcF*<2,(/;`rgսm ̀cEU@Rbl<<D=67=A= d=R= > >2>E>0Y> m>>[>gݔ>)>H> >֫>䳭>:>>>Bɨ>1>:>`>톔>ϰ>rK>|>0l>Z>H>k6>~#>Tm>-=iI=X====<<2ؼ3axSlӷܽ: [/N&42=W>H)R.[wc6j+q3}w|epX\ℾnÄ۷l{yvqjc.\SKAfw7,!N հ-߽ýPWRWRf*λWo"<<>{1=w=ܹ==: =e?>\:>@r->@>JT>^hh>?u|> X>>jך>[>6>>a>~>?3>Z>w>>>i>4>^>&>.,x>g>1V>;D>_1>> >==0=xux=P+=<+;;Y@ELǽk?*6X@BLpV_ShowDv"|Lq6Åf5gWr>ntesttools-0.1/unit-test-frame-help.pd0000644000175000017500000000042411674625224020154 0ustar zmoelnigzmoelnig#N canvas 211 94 724 463 10; #X obj 122 87 pddplink examples/example-unittest.pd; #X obj 39 146 unit-test-frame; #X text 37 29 [unit-test-frame] is an abstraction which helps you create a unit test patch for a (numeric) control object. For an example how to use it \, click:; testtools-0.1/testtools-meta.pd0000644000175000017500000000033511722455026017162 0ustar zmoelnigzmoelnig#N canvas 546 104 450 300 10; #N canvas 0 22 450 300 META 1; #X text 30 61 VERSION 0.1; #X text 30 91 AUTHOR Katja Vetter and Fred Jan Kraan katjavetter@gmail.com ; #X text 30 28 NAME testtools; #X restore 56 56 pd META;