Changeset 6c0e4396dfb0205342d19abe777e79a52f6f406b

Show
Ignore:
Timestamp:
04/19/08 14:38:24 (3 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1208608704 +0200
git-parent:

[3181ed58247fa2a9ff2d8fa311313b3451e4a8fc]

git-author:
Rafaël Carré <funman@videolan.org> 1208608704 +0200
Message:

Meta test:

Precise a comment
Wrap a long line
Rework the assertions:

Do it in the right order
Do not put str*cmp-that-could-be-a-ugly-glibc-macro in assert()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • test/libvlc/meta.c

    r727f7b3 r6c0e439  
    3939    catch (); 
    4040 
    41     /* Tell that we are interested in this precise meta data */ 
     41    /* Tell that we are interested in this precise meta data 
     42     * This is needed to trigger meta data reading 
     43     * (the first calls return NULL) */ 
    4244    artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex); 
    4345    catch (); 
     
    4648 
    4749    /* Wait for the meta */ 
    48     while (!libvlc_media_is_preparsed (media, &ex)) { catch (); msleep (10000); } 
     50    while (!libvlc_media_is_preparsed (media, &ex)) 
     51    { 
     52        catch (); 
     53        msleep (10000); 
     54    } 
    4955 
    5056    artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex); 
    5157    catch (); 
    5258 
    53     assert (artist && !strncmp (artist, "mike", 4))
     59    const char *expected_artist = "mike"
    5460 
    55     log ("+ got '%s' as Artist\n", artist); 
     61    assert (artist); 
     62    log ("+ got '%s' as Artist, expecting %s\n", artist, expected_artist); 
     63 
     64    int string_compare = strcmp (artist, expected_artist); 
     65    assert (!string_compare); 
    5666 
    5767    free (artist);