2 * meta.c - libvlc smoke test
7 /**********************************************************************
8 * Copyright (C) 2007 RĂ©mi Denis-Courmont. *
9 * Copyright (C) 2008 Pierre d'Herbemont. *
10 * This program is free software; you can redistribute and/or modify *
11 * it under the terms of the GNU General Public License as published *
12 * by the Free Software Foundation; version 2 of the license, or (at *
13 * your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
18 * See the GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, you can get it from: *
22 * http://www.gnu.org/copyleft/gpl.html *
23 **********************************************************************/
29 static void test_meta (const char ** argv
, int argc
)
31 libvlc_instance_t
*vlc
;
32 libvlc_media_t
*media
;
35 log ("Testing meta\n");
37 vlc
= libvlc_new (argc
, argv
);
40 media
= libvlc_media_new_path (vlc
, "samples/meta.sample");
43 libvlc_media_parse (media
);
45 artist
= libvlc_media_get_meta (media
, libvlc_meta_Artist
);
47 const char *expected_artist
= "mike";
50 log ("+ got '%s' as Artist, expecting %s\n", artist
, expected_artist
);
52 int string_compare
= strcmp (artist
, expected_artist
);
53 assert (!string_compare
);
56 libvlc_media_release (media
);
65 test_meta (test_defaults_args
, test_defaults_nargs
);