]> Savannah Git Hosting - gnulib.git/commitdiff
netinet_in: Add C++ tests.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Sep 2022 18:33:32 +0000 (20:33 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 3 Sep 2022 18:33:32 +0000 (20:33 +0200)
* 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.

ChangeLog
modules/netinet_in-c++-tests [new file with mode: 0644]
modules/netinet_in-tests
tests/test-netinet_in-c++.cc [new file with mode: 0644]

index f01394ba1972bded363130d1b033ab9336ffda9f..787971efabd586d931391a15e15626f92d418adb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/modules/netinet_in-c++-tests b/modules/netinet_in-c++-tests
new file mode 100644 (file)
index 0000000..c84cba5
--- /dev/null
@@ -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
index 08d1a28fde8646b7ec33841d08a19ee9d041b4a8..c68cfbf12afad6768c4d8c35c5ca660c26ce67f8 100644 (file)
@@ -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 (file)
index 0000000..e281925
--- /dev/null
@@ -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 ()
+{
+}