cxx-compat: add test suite for cxx-compat

Message ID 20200511152743.36616-1-maennich@google.com
State Committed
Headers
Series cxx-compat: add test suite for cxx-compat |

Commit Message

Matthias Männich May 11, 2020, 3:27 p.m. UTC
  This is an empty test to begin with and its sole purpose for now is to
make sure abg-cxx-compat.h can be compiled on its own.

	* tests/Makefile.am: Add new test case runtestcxxcompat.
	* tests/test-cxx-compat.cc: New test source file.

Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
---
 tests/Makefile.am        |  4 ++++
 tests/test-cxx-compat.cc | 30 ++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 tests/test-cxx-compat.cc
  

Comments

Dodji Seketeli May 13, 2020, 10:09 a.m. UTC | #1
Matthias Maennich <maennich@google.com> a écrit:

> This is an empty test to begin with and its sole purpose for now is to
> make sure abg-cxx-compat.h can be compiled on its own.
>
> 	* tests/Makefile.am: Add new test case runtestcxxcompat.
> 	* tests/test-cxx-compat.cc: New test source file.
>
> Reviewed-by: Giuliano Procida <gprocida@google.com>
> Signed-off-by: Matthias Maennich <maennich@google.com>
Acked-by: Dodji Seketeli <dodji@seketeli.org>

Applied to master, thanks!

Cheers,
  

Patch

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 68cbb09af833..2d8ab9e794a4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -41,6 +41,7 @@  runtestabidiffexit		\
 runtestaltdwarf			\
 runtestcanonicalizetypes.sh	\
 runtestcorediff			\
+runtestcxxcompat		\
 runtestdiffdwarf		\
 runtestdiffdwarfabixml		\
 runtestelfhelpers		\
@@ -150,6 +151,9 @@  runtestkmiwhitelist_LDADD = libtestutils.la libcatch.la $(top_builddir)/src/liba
 runtestelfhelpers_SOURCES = test-elf-helpers.cc
 runtestelfhelpers_LDADD = libcatch.la $(top_builddir)/src/libabigail.la
 
+runtestcxxcompat_SOURCES = test-cxx-compat.cc
+runtestcxxcompat_LDADD = libcatch.la $(top_builddir)/src/libabigail.la
+
 runtestsvg_SOURCES=test-svg.cc
 runtestsvg_LDADD=$(top_builddir)/src/libabigail.la
 
diff --git a/tests/test-cxx-compat.cc b/tests/test-cxx-compat.cc
new file mode 100644
index 000000000000..0a230a54e1a5
--- /dev/null
+++ b/tests/test-cxx-compat.cc
@@ -0,0 +1,30 @@ 
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2020 Google, Inc.
+//
+// This file is part of the GNU Application Binary Interface Generic
+// Analysis and Instrumentation Library (libabigail).  This library is
+// free software; you can redistribute it and/or modify it under the
+// terms of the GNU Lesser General Public License as published by the
+// Free Software Foundation; either version 3, 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
+// General Lesser Public License for more details.
+
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program; see the file COPYING-LGPLV3.  If
+// not, see <http://www.gnu.org/licenses/>.
+
+// Author: Matthias Maennich
+
+/// @file
+///
+/// This program tests libabigail's CXX compatibility layer.
+
+#include "lib/catch.hpp"
+
+#include "abg-cxx-compat.h"
+