LCOV - code coverage report
Current view: top level - tests - strlist-test.c (source / functions) Hit Total Coverage
Test: lcov.out Lines: 23 23 100.0 %
Date: 2012-07-17 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #include <stdio.h>
       2                 :            : 
       3                 :            : #include <pulse/xmalloc.h>
       4                 :            : 
       5                 :            : #include <pulsecore/strlist.h>
       6                 :            : 
       7                 :          1 : int main(int argc, char* argv[]) {
       8                 :            :     char *t, *u;
       9                 :          1 :     pa_strlist *l = NULL;
      10                 :            : 
      11                 :          1 :     l = pa_strlist_prepend(l, "e");
      12                 :          1 :     l = pa_strlist_prepend(l, "d");
      13                 :          1 :     l = pa_strlist_prepend(l, "c");
      14                 :          1 :     l = pa_strlist_prepend(l, "b");
      15                 :          1 :     l = pa_strlist_prepend(l, "a");
      16                 :            : 
      17                 :          1 :     t = pa_strlist_tostring(l);
      18                 :          1 :     pa_strlist_free(l);
      19                 :            : 
      20                 :          1 :     fprintf(stderr, "1: %s\n", t);
      21                 :            : 
      22                 :          1 :     l = pa_strlist_parse(t);
      23                 :          1 :     pa_xfree(t);
      24                 :            : 
      25                 :          1 :     t = pa_strlist_tostring(l);
      26                 :          1 :     fprintf(stderr, "2: %s\n", t);
      27                 :          1 :     pa_xfree(t);
      28                 :            : 
      29                 :          1 :     l = pa_strlist_pop(l, &u);
      30                 :          1 :     fprintf(stderr, "3: %s\n", u);
      31                 :          1 :     pa_xfree(u);
      32                 :            : 
      33                 :          1 :     l = pa_strlist_remove(l, "c");
      34                 :            : 
      35                 :          1 :     t = pa_strlist_tostring(l);
      36                 :          1 :     fprintf(stderr, "4: %s\n", t);
      37                 :          1 :     pa_xfree(t);
      38                 :            : 
      39                 :          1 :     pa_strlist_free(l);
      40                 :            : 
      41                 :            :     return 0;
      42                 :            : }

Generated by: LCOV version 1.9