From: Bruno Haible Date: Fri, 3 Oct 2025 19:50:29 +0000 (+0200) Subject: unistr/base: Add tests. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8077cba5bc67970d7a783c203ab07ed085f9267a;p=thirdparty%2Fgnulib.git unistr/base: Add tests. * tests/unistr/test-unistr-h.c: New file. * modules/unistr/base-tests: New file. * tests/unistr/test-unistr-h-c++.cc: New file. * modules/unistr/base-c++-tests: New file. --- diff --git a/ChangeLog b/ChangeLog index c24a3c46d2..11a5fd25af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-10-03 Bruno Haible + + unistr/base: Add tests. + * tests/unistr/test-unistr-h.c: New file. + * modules/unistr/base-tests: New file. + * tests/unistr/test-unistr-h-c++.cc: New file. + * modules/unistr/base-c++-tests: New file. + 2025-10-03 Bruno Haible unistr, unigbrk: Fix compilation error in C++ mode (regr. 2025-02-09). diff --git a/modules/unistr/base-c++-tests b/modules/unistr/base-c++-tests new file mode 100644 index 0000000000..e87108d825 --- /dev/null +++ b/modules/unistr/base-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/unistr/test-unistr-h-c++.cc + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-unistr-h-c++ +check_PROGRAMS += test-unistr-h-c++ +test_unistr_h_c___SOURCES = unistr/test-unistr-h-c++.cc +test_unistr_h_c___LDADD = $(LDADD) $(LIBUNISTRING) +endif diff --git a/modules/unistr/base-tests b/modules/unistr/base-tests new file mode 100644 index 0000000000..68fa61886e --- /dev/null +++ b/modules/unistr/base-tests @@ -0,0 +1,13 @@ +Files: +tests/unistr/test-unistr-h.c + +Depends-on: +unistr/base-c++-tests + +configure.ac: + +Makefile.am: +TESTS += test-unistr-h +check_PROGRAMS += test-unistr-h +test_unistr_h_SOURCES = unistr/test-unistr-h.c +test_unistr_h_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/tests/unistr/test-unistr-h-c++.cc b/tests/unistr/test-unistr-h-c++.cc new file mode 100644 index 0000000000..507c3d7179 --- /dev/null +++ b/tests/unistr/test-unistr-h-c++.cc @@ -0,0 +1,25 @@ +/* Test of in C++ mode. + Copyright (C) 2025 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 . */ + +#include + +/* Specification. */ +#include + +int +main () +{ +} diff --git a/tests/unistr/test-unistr-h.c b/tests/unistr/test-unistr-h.c new file mode 100644 index 0000000000..085fcac567 --- /dev/null +++ b/tests/unistr/test-unistr-h.c @@ -0,0 +1,26 @@ +/* Test of . + Copyright (C) 2025 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 . */ + +#include + +/* Specification. */ +#include + +int +main (void) +{ + return 0; +}