[polypaudio-commits] r800 - in /trunk/src: ./ Makefile.am tests/channelmap-test.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed Apr 26 07:34:46 PDT 2006


Author: lennart
Date: Wed Apr 26 16:34:45 2006
New Revision: 800

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=800&root=polypaudio&view=rev
Log:
add new test 'channelmap-test'

Added:
    trunk/src/tests/channelmap-test.c
Modified:
    trunk/src/   (props changed)
    trunk/src/Makefile.am

Propchange: trunk/src/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Apr 26 16:34:45 2006
@@ -1,3 +1,4 @@
+channelmap-test
 *.loT
 pabrowse
 memblockq-test

Modified: trunk/src/Makefile.am
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/Makefile.am?rev=800&root=polypaudio&r1=799&r2=800&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Wed Apr 26 16:34:45 2006
@@ -187,7 +187,8 @@
 		strlist-test \
 		voltest \
 		memblockq-test \
-		sync-playback
+		sync-playback \
+		channelmap-test
 
 if HAVE_SIGXCPU
 noinst_PROGRAMS += \
@@ -234,6 +235,11 @@
 voltest_CFLAGS = $(AM_CFLAGS)
 voltest_LDADD = $(AM_LDADD) libpolyp- at PA_MAJORMINOR@.la
 voltest_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+
+channelmap_test_SOURCES = tests/channelmap-test.c
+channelmap_test_CFLAGS = $(AM_CFLAGS)
+channelmap_test_LDADD = $(AM_LDADD) libpolyp- at PA_MAJORMINOR@.la
+channelmap_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
 
 cpulimit_test_SOURCES = tests/cpulimit-test.c daemon/cpulimit.c daemon/cpulimit.h
 cpulimit_test_CFLAGS = $(AM_CFLAGS)

Added: trunk/src/tests/channelmap-test.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/tests/channelmap-test.c?rev=800&root=polypaudio&view=auto
==============================================================================
--- trunk/src/tests/channelmap-test.c (added)
+++ trunk/src/tests/channelmap-test.c Wed Apr 26 16:34:45 2006
@@ -1,0 +1,25 @@
+/* $Id$ */
+
+#include <stdio.h>
+#include <assert.h>
+
+#include <polyp/channelmap.h>
+#include <polypcore/gccmacro.h>
+
+int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
+    char cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+    pa_channel_map map, map2;
+
+    pa_channel_map_init_auto(&map, 5);
+    
+    fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map));
+
+    pa_channel_map_parse(&map2, cm);
+
+    assert(pa_channel_map_equal(&map, &map2));
+
+    pa_channel_map_parse(&map2, "left,test");
+
+    
+    return 0;
+}




More information about the pulseaudio-commits mailing list