diff options
author | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:36:19 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:36:19 +0200 |
commit | fba5fd39277dce3cac9fb72394bc7b3af36303a6 (patch) | |
tree | 8bc5422402766d6d2efb8029b501b56cdd081a33 | |
parent | 30e64672a7ac497ad0e4c0b8c25890844bbe46e1 (diff) | |
download | gnulib-fba5fd39277dce3cac9fb72394bc7b3af36303a6.tar.gz |
pthread-h: Add C++ tests.
* tests/test-pthread-c++.cc: New file.
* modules/pthread-h-c++-tests: New file.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | modules/pthread-h-c++-tests | 19 | ||||
-rw-r--r-- | tests/test-pthread-c++.cc | 36 |
3 files changed, 61 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2019-07-14 Bruno Haible <bruno@clisp.org> + pthread-h: Add C++ tests. + * tests/test-pthread-c++.cc: New file. + * modules/pthread-h-c++-tests: New file. + +2019-07-14 Bruno Haible <bruno@clisp.org> + pthread-h: Add tests. * tests/test-pthread.c: New file. * modules/pthread-h-tests: New file. 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 <pthread.h> 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 <https://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <bruno@clisp.org>, 2019. */ + +#define GNULIB_NAMESPACE gnulib +#include <config.h> + +#include <pthread.h> + +#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 () +{ +} |