1 /* GStreamer
2 * Copyright (C) 2011 Tim-Philipp Müller <tim centricular net>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include <config.h>
22 #endif
23
24 #include <gst/gst.h>
25 #include <gst/check/check.h>
26 #include <gst/base/base.h>
27 #include <gst/controller/controller.h>
28 #include <gst/net/net.h>
29
30 /* we mostly just want to make sure that our library headers don't
31 * contain anything a C++ compiler might not like */
GST_START_TEST(test_nothing)32 GST_START_TEST (test_nothing)
33 {
34 gst_init (NULL, NULL);
35 }
36
37 GST_END_TEST;
38
GST_START_TEST(test_init_macros)39 GST_START_TEST (test_init_macros)
40 {
41 GstBitReader bit_reader = GST_BIT_READER_INIT (NULL, 0);
42 GstByteReader byte_reader = GST_BYTE_READER_INIT (NULL, 0);
43
44 fail_unless (bit_reader.data == NULL);
45 fail_unless (byte_reader.data == NULL);
46 }
47
48 GST_END_TEST;
49
50 static Suite *
libscpp_suite(void)51 libscpp_suite (void)
52 {
53 Suite *s = suite_create ("GstLibsCpp");
54 TCase *tc_chain = tcase_create ("C++ libs header tests");
55
56 suite_add_tcase (s, tc_chain);
57 tcase_add_test (tc_chain, test_nothing);
58 tcase_add_test (tc_chain, test_init_macros);
59
60 return s;
61 }
62
63 GST_CHECK_MAIN (libscpp);
64