From: Bruno Haible Date: Mon, 15 Jul 2019 00:36:19 +0000 (+0200) Subject: pthread-h: Add C++ tests. X-Git-Tag: v1.0~4755 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fba5fd39277dce3cac9fb72394bc7b3af36303a6;p=thirdparty%2Fgnulib.git pthread-h: Add C++ tests. * tests/test-pthread-c++.cc: New file. * modules/pthread-h-c++-tests: New file. --- diff --git a/ChangeLog b/ChangeLog index 3932992e55..2bdf7d61d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2019-07-14 Bruno Haible + + pthread-h: Add C++ tests. + * tests/test-pthread-c++.cc: New file. + * modules/pthread-h-c++-tests: New file. + 2019-07-14 Bruno Haible pthread-h: Add tests. diff --git a/modules/pthread-h-c++-tests b/modules/pthread-h-c++-tests new file mode 100644 index 0000000000..1886b0a276 --- /dev/null +++ b/modules/pthread-h-c++-tests @@ -0,0 +1,19 @@ +Files: +tests/test-pthread-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-pthread-c++ +check_PROGRAMS += test-pthread-c++ +test_pthread_c___SOURCES = test-pthread-c++.cc +test_pthread_c___LDADD = $(LDADD) $(LIB_PTHREAD) +endif diff --git a/tests/test-pthread-c++.cc b/tests/test-pthread-c++.cc new file mode 100644 index 0000000000..dff13f884f --- /dev/null +++ b/tests/test-pthread-c++.cc @@ -0,0 +1,36 @@ +/* Test of substitute in C++ mode. + Copyright (C) 2019 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 . */ + +/* Written by Bruno Haible , 2019. */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include + +#include "signature.h" + + +#if GNULIB_TEST_PTHREAD_MUTEX_TIMEDLOCK +SIGNATURE_CHECK (GNULIB_NAMESPACE::pthread_mutex_timedlock, int, + (pthread_mutex_t *, const struct timespec *)); +#endif + + +int +main () +{ +}