summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-09-03 20:33:32 +0200
committerBruno Haible <bruno@clisp.org>2022-09-03 20:33:32 +0200
commitc6dc4ec6cac1c2ecac037df50d83ff7267eb144a (patch)
tree0ee14550b6643a4fc3e071317ccbab63a08ca750
parent9873e7b560392a33250c9ee7cbb7d3d235fc1c5b (diff)
downloadgnulib-c6dc4ec6cac1c2ecac037df50d83ff7267eb144a.tar.gz
netinet_in: Add C++ tests.
* tests/test-netinet_in-c++.cc: New file. * modules/netinet_in-c++-tests: New file. * modules/netinet_in-tests (Depends-on): Add netinet_in-c++-tests.
-rw-r--r--ChangeLog7
-rw-r--r--modules/netinet_in-c++-tests17
-rw-r--r--modules/netinet_in-tests1
-rw-r--r--tests/test-netinet_in-c++.cc28
4 files changed, 53 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f01394ba19..787971efab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2022-09-03 Bruno Haible <bruno@clisp.org>
+ netinet_in: Add C++ tests.
+ * tests/test-netinet_in-c++.cc: New file.
+ * modules/netinet_in-c++-tests: New file.
+ * modules/netinet_in-tests (Depends-on): Add netinet_in-c++-tests.
+
+2022-09-03 Bruno Haible <bruno@clisp.org>
+
net_if: Add C++ tests.
* tests/test-net_if-c++.cc: New file.
* modules/net_if-c++-tests: New file.
diff --git a/modules/netinet_in-c++-tests b/modules/netinet_in-c++-tests
new file mode 100644
index 0000000000..c84cba55cc
--- /dev/null
+++ b/modules/netinet_in-c++-tests
@@ -0,0 +1,17 @@
+Files:
+tests/test-netinet_in-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-netinet_in-c++
+check_PROGRAMS += test-netinet_in-c++
+test_netinet_in_c___SOURCES = test-netinet_in-c++.cc
+endif
diff --git a/modules/netinet_in-tests b/modules/netinet_in-tests
index 08d1a28fde..c68cfbf12a 100644
--- a/modules/netinet_in-tests
+++ b/modules/netinet_in-tests
@@ -2,6 +2,7 @@ Files:
tests/test-netinet_in.c
Depends-on:
+netinet_in-c++-tests
configure.ac:
diff --git a/tests/test-netinet_in-c++.cc b/tests/test-netinet_in-c++.cc
new file mode 100644
index 0000000000..e28192573f
--- /dev/null
+++ b/tests/test-netinet_in-c++.cc
@@ -0,0 +1,28 @@
+/* Test of <netinet/in.h> substitute in C++ mode.
+ Copyright (C) 2022 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2022. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <netinet/in.h>
+
+
+int
+main ()
+{
+}