]> Savannah Git Hosting - gnulib.git/commitdiff
inttypes-c++-tests: New module.
authorBruno Haible <bruno@clisp.org>
Fri, 5 May 2017 19:50:57 +0000 (21:50 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 5 May 2017 22:22:37 +0000 (00:22 +0200)
* tests/test-inttypes-c++.cc: New file.
(strtoimax): Declare, missing since 2012-01-05.
(strtoumax): Declare, missing since 2012-01-05.
* modules/inttypes-c++-tests: New file.

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

index 4ef1fcad1ccf54a7d365e841901494baea5c5d76..8f867383a64467b7594263054117b86a9b273ac9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-05 Bruno Haible  <bruno@clisp.org>
+
+       inttypes-c++-tests: New module.
+       * tests/test-inttypes-c++.cc: New file.
+       (strtoimax): Declare, missing since 2012-01-05.
+       (strtoumax): Declare, missing since 2012-01-05.
+       * modules/inttypes-c++-tests: New file.
+
 2017-05-05 Bruno Haible  <bruno@clisp.org>
 
        dirent-c++-tests: Update.
diff --git a/modules/inttypes-c++-tests b/modules/inttypes-c++-tests
new file mode 100644 (file)
index 0000000..7f7e918
--- /dev/null
@@ -0,0 +1,18 @@
+Files:
+tests/test-inttypes-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-inttypes-c++
+check_PROGRAMS += test-inttypes-c++
+test_inttypes_c___SOURCES = test-inttypes-c++.cc
+endif
diff --git a/tests/test-inttypes-c++.cc b/tests/test-inttypes-c++.cc
new file mode 100644 (file)
index 0000000..d0ce8c2
--- /dev/null
@@ -0,0 +1,39 @@
+/* Test of <inttypes.h> substitute in C++ mode.
+   Copyright (C) 2010-2017 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 <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2017.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <inttypes.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_STRTOIMAX
+SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoimax, intmax_t, (const char *, char **, int));
+#endif
+
+#if GNULIB_TEST_STRTOUMAX
+SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoumax, uintmax_t, (const char *, char **, int));
+#endif
+
+
+int
+main ()
+{
+}