root/test/libvlc/core.c

Revision 01a95e76381eebe5a99a6feefc6a9cfff770962e, 1.8 kB (checked in by Pierre d'Herbemont <pdherbemont@videolan.org>, 5 months ago)

test: Move testapi.c to /test and use a sample file that is not ogg for basic testing.

This sample is downloaded from streams.videolan.org. Feel free to find a better suited codec/demux combination.
libvlc test are now splitted a bit.
Tests that are specific to core and that don't need vlc's modules are kept in src/test.

  • Property mode set to 100644
Line 
1 /*
2  * core.c - libvlc smoke test
3  *
4  * $Id$
5  */
6
7 /**********************************************************************
8  *  Copyright (C) 2007 RĂ©mi Denis-Courmont.                           *
9  *  This program is free software; you can redistribute and/or modify *
10  *  it under the terms of the GNU General Public License as published *
11  *  by the Free Software Foundation; version 2 of the license, or (at *
12  *  your option) any later version.                                   *
13  *                                                                    *
14  *  This program is distributed in the hope that it will be useful,   *
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of    *
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.              *
17  *  See the GNU General Public License for more details.              *
18  *                                                                    *
19  *  You should have received a copy of the GNU General Public License *
20  *  along with this program; if not, you can get it from:             *
21  *  http://www.gnu.org/copyleft/gpl.html                              *
22  **********************************************************************/
23
24 #include "test.h"
25
26 static void test_core (const char ** argv, int argc)
27 {
28     libvlc_instance_t *vlc;
29     int id;
30
31     log ("Testing core\n");
32
33     libvlc_exception_init (&ex);
34     vlc = libvlc_new (argc, argv, &ex);
35     catch ();
36
37     libvlc_playlist_clear (vlc, &ex);
38     catch ();
39
40     id = libvlc_playlist_add_extended (vlc, "/dev/null", "Test", 0, NULL,
41                                        &ex);
42     catch ();
43
44     libvlc_playlist_clear (vlc, &ex);
45     catch ();
46
47     libvlc_retain (vlc);
48     libvlc_release (vlc);
49     libvlc_release (vlc);
50 }
51
52
53 int main (void)
54 {
55     test_init();
56
57     test_core (test_defaults_args, test_defaults_nargs);
58
59     return 0;
60 }
Note: See TracBrowser for help on using the browser.