]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
uniwidth/base: Add tests.
authorBruno Haible <bruno@clisp.org>
Fri, 3 Oct 2025 19:50:53 +0000 (21:50 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 3 Oct 2025 19:50:53 +0000 (21:50 +0200)
* tests/uniwidth/test-uniwidth-h.c: New file.
* modules/uniwidth/base-tests: New file.
* tests/uniwidth/test-uniwidth-h-c++.cc: New file.
* modules/uniwidth/base-c++-tests: New file.

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

index be64434def99a8d046677340d5f73f9a3197f5fa..abbe399c766865652571ebe38a817170b8c644a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-10-03  Bruno Haible  <bruno@clisp.org>
 
+       uniwidth/base: Add tests.
+       * tests/uniwidth/test-uniwidth-h.c: New file.
+       * modules/uniwidth/base-tests: New file.
+       * tests/uniwidth/test-uniwidth-h-c++.cc: New file.
+       * modules/uniwidth/base-c++-tests: New file.
+
        unictype/base: Add tests.
        * tests/unictype/test-unictype-h.c: New file.
        * modules/unictype/base-tests: New file.
diff --git a/modules/uniwidth/base-c++-tests b/modules/uniwidth/base-c++-tests
new file mode 100644 (file)
index 0000000..a0021c6
--- /dev/null
@@ -0,0 +1,18 @@
+Files:
+tests/uniwidth/test-uniwidth-h-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-uniwidth-h-c++
+check_PROGRAMS += test-uniwidth-h-c++
+test_uniwidth_h_c___SOURCES = uniwidth/test-uniwidth-h-c++.cc
+test_uniwidth_h_c___LDADD = $(LDADD) $(LIBUNISTRING)
+endif
diff --git a/modules/uniwidth/base-tests b/modules/uniwidth/base-tests
new file mode 100644 (file)
index 0000000..d55cf50
--- /dev/null
@@ -0,0 +1,13 @@
+Files:
+tests/uniwidth/test-uniwidth-h.c
+
+Depends-on:
+uniwidth/base-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-uniwidth-h
+check_PROGRAMS += test-uniwidth-h
+test_uniwidth_h_SOURCES = uniwidth/test-uniwidth-h.c
+test_uniwidth_h_LDADD = $(LDADD) $(LIBUNISTRING)
diff --git a/tests/uniwidth/test-uniwidth-h-c++.cc b/tests/uniwidth/test-uniwidth-h-c++.cc
new file mode 100644 (file)
index 0000000..6823884
--- /dev/null
@@ -0,0 +1,25 @@
+/* Test of <uniwidth.h> 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 <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <uniwidth.h>
+
+int
+main ()
+{
+}
diff --git a/tests/uniwidth/test-uniwidth-h.c b/tests/uniwidth/test-uniwidth-h.c
new file mode 100644 (file)
index 0000000..74f1d6a
--- /dev/null
@@ -0,0 +1,26 @@
+/* Test of <uniwidth.h>.
+   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 <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <uniwidth.h>
+
+int
+main (void)
+{
+  return 0;
+}