>From 6ac18d06d0234f85c41af69fb6319592e2d4f5c6 Mon Sep 17 00:00:00 2001 From: Bruno Haible
Date: Thu, 20 Jun 2019 04:37:23 +0200 Subject: [PATCH 22/26] thrd: Add tests. * tests/test-thrd_create.c: New file, based on tests/test-thread_create.c. * tests/test-thrd_current.c: New file, based on tests/test-thread_self.c. * modules/thrd-tests: New file. --- ChangeLog | 9 ++++++ modules/thrd-tests | 14 +++++++++ tests/test-thrd_create.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++ tests/test-thrd_current.c | 31 ++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 modules/thrd-tests create mode 100644 tests/test-thrd_create.c create mode 100644 tests/test-thrd_current.c diff --git a/ChangeLog b/ChangeLog index 4c75b69..b17e751 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2019-06-20 Bruno Haible + thrd: Add tests. + * tests/test-thrd_create.c: New file, based on + tests/test-thread_create.c. + * tests/test-thrd_current.c: New file, based on + tests/test-thread_self.c. + * modules/thrd-tests: New file. + +2019-06-20 Bruno Haible + tss: New module. * lib/tss.c: New file. * modules/tss: New file. diff --git a/modules/thrd-tests b/modules/thrd-tests new file mode 100644 index 0000000..fdb6600 --- /dev/null +++ b/modules/thrd-tests @@ -0,0 +1,14 @@ +Files: +tests/test-thrd_current.c +tests/test-thrd_create.c +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-thrd_current test-thrd_create +check_PROGRAMS += test-thrd_current test-thrd_create +test_thrd_current_LDADD = $(LDADD) @LIBSTDTHREAD@ +test_thrd_create_LDADD = $(LDADD) @LIBSTDTHREAD@ diff --git a/tests/test-thrd_create.c b/tests/test-thrd_create.c new file mode 100644 index 0000000..af1eb53 --- /dev/null +++ b/tests/test-thrd_create.c @@ -0,0 +1,73 @@ +/* Test of thrd_create () macro. + Copyright (C) 2011-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