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

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

index 11a5fd25afdee3cd5682addaa47b58d336cd82e6..88f1bf46c5a312f9bcbfeec03c84b438839e78cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-10-03  Bruno Haible  <bruno@clisp.org>
 
+       uniconv/base: Add tests.
+       * tests/uniconv/test-uniconv-h.c: New file.
+       * modules/uniconv/base-tests: New file.
+       * tests/uniconv/test-uniconv-h-c++.cc: New file.
+       * modules/uniconv/base-c++-tests: New file.
+
        unistr/base: Add tests.
        * tests/unistr/test-unistr-h.c: New file.
        * modules/unistr/base-tests: New file.
diff --git a/modules/uniconv/base-c++-tests b/modules/uniconv/base-c++-tests
new file mode 100644 (file)
index 0000000..fcb6883
--- /dev/null
@@ -0,0 +1,18 @@
+Files:
+tests/uniconv/test-uniconv-h-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-uniconv-h-c++
+check_PROGRAMS += test-uniconv-h-c++
+test_uniconv_h_c___SOURCES = uniconv/test-uniconv-h-c++.cc
+test_uniconv_h_c___LDADD = $(LDADD) $(LIBUNISTRING)
+endif
diff --git a/modules/uniconv/base-tests b/modules/uniconv/base-tests
new file mode 100644 (file)
index 0000000..00067a3
--- /dev/null
@@ -0,0 +1,13 @@
+Files:
+tests/uniconv/test-uniconv-h.c
+
+Depends-on:
+uniconv/base-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-uniconv-h
+check_PROGRAMS += test-uniconv-h
+test_uniconv_h_SOURCES = uniconv/test-uniconv-h.c
+test_uniconv_h_LDADD = $(LDADD) $(LIBUNISTRING)
diff --git a/tests/uniconv/test-uniconv-h-c++.cc b/tests/uniconv/test-uniconv-h-c++.cc
new file mode 100644 (file)
index 0000000..988eb61
--- /dev/null
@@ -0,0 +1,25 @@
+/* Test of <uniconv.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 <uniconv.h>
+
+int
+main ()
+{
+}
diff --git a/tests/uniconv/test-uniconv-h.c b/tests/uniconv/test-uniconv-h.c
new file mode 100644 (file)
index 0000000..150cbe7
--- /dev/null
@@ -0,0 +1,26 @@
+/* Test of <uniconv.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 <uniconv.h>
+
+int
+main (void)
+{
+  return 0;
+}