[0.11] gstreamer: tests: add libscpp unit test to make sure g++ likes our library headers

Edward Hervey bilboed at kemper.freedesktop.org
Wed Mar 30 12:33:38 PDT 2011


Module: gstreamer
Branch: 0.11
Commit: f9558b163fab74d97a747823d2abede31f343871
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=f9558b163fab74d97a747823d2abede31f343871

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sat Mar 12 17:01:39 2011 +0000

tests: add libscpp unit test to make sure g++ likes our library headers

---

 tests/check/Makefile.am        |    4 ++-
 tests/check/libs/.gitignore    |    1 +
 tests/check/libs/gstlibscpp.cc |   75 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 79 insertions(+), 1 deletions(-)

diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 83e38aa..d006bc7 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -44,7 +44,7 @@ endif
 endif
 
 if HAVE_CXX
-CXX_CHECKS = gst/gstcpp
+CXX_CHECKS = gst/gstcpp libs/gstlibscpp
 else
 CXX_CHECKS =
 endif
@@ -166,6 +166,8 @@ LDADD = $(top_builddir)/libs/gst/check/libgstcheck- at GST_MAJORMINOR@.la \
 
 gst_gstcpp_SOURCES = gst/gstcpp.cc
 
+libs_gstlibscpp_SOURCES = libs/gstlibscpp.cc
+
 gst_gstutils_LDADD = $(LDADD) $(GSL_LIBS) $(GMP_LIBS)
 
 libs_gdp_SOURCES = \
diff --git a/tests/check/libs/.gitignore b/tests/check/libs/.gitignore
index 64540fd..8eb96b4 100644
--- a/tests/check/libs/.gitignore
+++ b/tests/check/libs/.gitignore
@@ -8,6 +8,7 @@ bytewriter
 gdp
 collectpads
 controller
+gstlibscpp
 gstnetclientclock
 gstnettimeprovider
 libsabi
diff --git a/tests/check/libs/gstlibscpp.cc b/tests/check/libs/gstlibscpp.cc
new file mode 100644
index 0000000..23079e8
--- /dev/null
+++ b/tests/check/libs/gstlibscpp.cc
@@ -0,0 +1,75 @@
+/* GStreamer
+ * Copyright (C) 2011 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gst/gst.h>
+#include <gst/check/gstcheck.h>
+
+#include <gst/base/gstadapter.h>
+#include <gst/base/gstbasesink.h>
+#include <gst/base/gstbasesrc.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/base/gstbitreader.h>
+#include <gst/base/gstbytereader.h>
+#include <gst/base/gstbytewriter.h>
+#include <gst/base/gstcollectpads.h>
+#include <gst/base/gstdataqueue.h>
+#include <gst/base/gstpushsrc.h>
+#include <gst/base/gsttypefindhelper.h>
+
+#include <gst/controller/gstcontroller.h>
+#include <gst/controller/gstcontrollerprivate.h>
+#include <gst/controller/gstcontrolsource.h>
+#include <gst/controller/gstinterpolationcontrolsource.h>
+#include <gst/controller/gstinterpolationcontrolsourceprivate.h>
+#include <gst/controller/gstlfocontrolsource.h>
+#include <gst/controller/gstlfocontrolsourceprivate.h>
+
+#include <gst/dataprotocol/dataprotocol.h>
+
+#include <gst/net/gstnetclientclock.h>
+#include <gst/net/gstnet.h>
+#include <gst/net/gstnettimepacket.h>
+#include <gst/net/gstnettimeprovider.h>
+
+/* we mostly just want to make sure that our library headers don't
+ * contain anything a C++ compiler might not like */
+GST_START_TEST (test_nothing)
+{
+  gst_init (NULL, NULL);
+}
+
+GST_END_TEST;
+
+static Suite *
+libscpp_suite (void)
+{
+  Suite *s = suite_create ("GstLibsCpp");
+  TCase *tc_chain = tcase_create ("C++ libs header tests");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_nothing);
+
+  return s;
+}
+
+GST_CHECK_MAIN (libscpp);



More information about the gstreamer-commits mailing list