diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/channelmap-test.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/channelmap-test.c b/src/tests/channelmap-test.c new file mode 100644 index 00000000..522c136f --- /dev/null +++ b/src/tests/channelmap-test.c @@ -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; +} |