2 * Copyright (C) <2005> Thomas Vander Stichele <thomas at apestaart dot org>
4 * gst.c: Unit test for gst.c
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #include <gst/check/gstcheck.h>
24 GST_START_TEST (test_init)
26 /* don't segfault with NULL, NULL */
27 gst_init (NULL, NULL);
28 /* allow calling twice */
29 gst_init (NULL, NULL);
34 GST_START_TEST (test_deinit)
36 gst_init (NULL, NULL);
43 GST_START_TEST (test_deinit_sysclock)
47 gst_init (NULL, NULL);
49 clock = gst_system_clock_obtain ();
50 gst_object_unref (clock);
61 Suite *s = suite_create ("Gst");
62 TCase *tc_chain = tcase_create ("gst tests");
64 suite_add_tcase (s, tc_chain);
65 tcase_add_test (tc_chain, test_init);
66 tcase_add_test (tc_chain, test_deinit);
67 tcase_add_test (tc_chain, test_deinit_sysclock);
73 main (int argc, char **argv)
77 Suite *s = gst_suite ();
78 SRunner *sr = srunner_create (s);
80 gst_check_init (&argc, &argv);
82 srunner_run_all (sr, CK_NORMAL);
83 nf = srunner_ntests_failed (sr);