mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
add new test 'channelmap-test'
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@800 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
195e96912f
commit
5f7cc0c870
2 changed files with 32 additions and 1 deletions
|
|
@ -187,7 +187,8 @@ noinst_PROGRAMS = \
|
||||||
strlist-test \
|
strlist-test \
|
||||||
voltest \
|
voltest \
|
||||||
memblockq-test \
|
memblockq-test \
|
||||||
sync-playback
|
sync-playback \
|
||||||
|
channelmap-test
|
||||||
|
|
||||||
if HAVE_SIGXCPU
|
if HAVE_SIGXCPU
|
||||||
noinst_PROGRAMS += \
|
noinst_PROGRAMS += \
|
||||||
|
|
@ -235,6 +236,11 @@ voltest_CFLAGS = $(AM_CFLAGS)
|
||||||
voltest_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la
|
voltest_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la
|
||||||
voltest_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
voltest_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||||
|
|
||||||
|
channelmap_test_SOURCES = tests/channelmap-test.c
|
||||||
|
channelmap_test_CFLAGS = $(AM_CFLAGS)
|
||||||
|
channelmap_test_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la
|
||||||
|
channelmap_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||||
|
|
||||||
cpulimit_test_SOURCES = tests/cpulimit-test.c daemon/cpulimit.c daemon/cpulimit.h
|
cpulimit_test_SOURCES = tests/cpulimit-test.c daemon/cpulimit.c daemon/cpulimit.h
|
||||||
cpulimit_test_CFLAGS = $(AM_CFLAGS)
|
cpulimit_test_CFLAGS = $(AM_CFLAGS)
|
||||||
cpulimit_test_LDADD = $(AM_LDADD) libpolypcore.la
|
cpulimit_test_LDADD = $(AM_LDADD) libpolypcore.la
|
||||||
|
|
|
||||||
25
src/tests/channelmap-test.c
Normal file
25
src/tests/channelmap-test.c
Normal file
|
|
@ -0,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;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue