Test that gnulib does not break the standard C++ headers.
authorBruno Haible <bruno@clisp.org>
Sat, 13 Mar 2010 15:20:41 +0000 (16:20 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 13 Mar 2010 15:20:41 +0000 (16:20 +0100)
15 files changed:
ChangeLog
modules/locale-tests
modules/math-tests
modules/signal-tests
modules/stdio-tests
modules/stdlib-tests
modules/string-tests
modules/time-tests
tests/test-locale-c++2.cc [new file with mode: 0644]
tests/test-math-c++2.cc [new file with mode: 0644]
tests/test-signal-c++2.cc [new file with mode: 0644]
tests/test-stdio-c++2.cc [new file with mode: 0644]
tests/test-stdlib-c++2.cc [new file with mode: 0644]
tests/test-string-c++2.cc [new file with mode: 0644]
tests/test-time-c++2.cc [new file with mode: 0644]

index 050afaf..4502de6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
 2010-03-13  Bruno Haible  <bruno@clisp.org>
 
+       Test that gnulib does not break the standard C++ headers.
+       * tests/test-locale-c++2.cc: New file.
+       * modules/locale-tests (Files): Add it.
+       (Makefile.am): Compile it for test-locale-c++.
+       * tests/test-math-c++2.cc: New file.
+       * modules/math-tests (Files): Add it.
+       (Makefile.am): Compile it for test-math-c++.
+       * tests/test-signal-c++2.cc: New file.
+       * modules/signal-tests (Files): Add it.
+       (Makefile.am): Compile it for test-signal-c++.
+       * tests/test-stdio-c++2.cc: New file.
+       * modules/stdio-tests (Files): Add it.
+       (Makefile.am): Compile it for test-stdio-c++.
+       * tests/test-stdlib-c++2.cc: New file.
+       * modules/stdlib-tests (Files): Add it.
+       (Makefile.am): Compile it for test-stdlib-c++.
+       * tests/test-string-c++2.cc: New file.
+       * modules/string-tests (Files): Add it.
+       (Makefile.am): Compile it for test-string-c++.
+       * tests/test-time-c++2.cc: New file.
+       * modules/time-tests (Files): Add it.
+       (Makefile.am): Compile it for test-time-c++.
+       Reported by John W. Eaton <jwe@gnu.org>.
+
+2010-03-13  Bruno Haible  <bruno@clisp.org>
+
        * gnulib-tool (func_usage): Clarify which options are available for
        --create-testdir and --create-megatestdir.
 
index 5662a64..5fad3fb 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-locale.c
 tests/test-locale-c++.cc
+tests/test-locale-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -16,5 +17,5 @@ check_PROGRAMS += test-locale
 if ANSICXX
 TESTS += test-locale-c++
 check_PROGRAMS += test-locale-c++
-test_locale_c___SOURCES = test-locale-c++.cc
+test_locale_c___SOURCES = test-locale-c++.cc test-locale-c++2.cc
 endif
index 71f6d68..5d89f28 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-math.c
 tests/test-math-c++.cc
+tests/test-math-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -14,5 +15,5 @@ check_PROGRAMS += test-math
 if ANSICXX
 TESTS += test-math-c++
 check_PROGRAMS += test-math-c++
-test_math_c___SOURCES = test-math-c++.cc
+test_math_c___SOURCES = test-math-c++.cc test-math-c++2.cc
 endif
index f8c9f7a..9c79b01 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-signal.c
 tests/test-signal-c++.cc
+tests/test-signal-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -14,6 +15,6 @@ check_PROGRAMS += test-signal
 if ANSICXX
 TESTS += test-signal-c++
 check_PROGRAMS += test-signal-c++
-test_signal_c___SOURCES = test-signal-c++.cc
+test_signal_c___SOURCES = test-signal-c++.cc test-signal-c++2.cc
 test_signal_c___LDADD = $(LDADD) $(LIBINTL)
 endif
index 908f878..327780d 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-stdio.c
 tests/test-stdio-c++.cc
+tests/test-stdio-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -15,6 +16,6 @@ check_PROGRAMS += test-stdio
 if ANSICXX
 TESTS += test-stdio-c++
 check_PROGRAMS += test-stdio-c++
-test_stdio_c___SOURCES = test-stdio-c++.cc
+test_stdio_c___SOURCES = test-stdio-c++.cc test-stdio-c++2.cc
 test_stdio_c___LDADD = $(LDADD) $(LIBINTL)
 endif
index dc9ccde..2673470 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-stdlib.c
 tests/test-stdlib-c++.cc
+tests/test-stdlib-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -15,6 +16,6 @@ check_PROGRAMS += test-stdlib
 if ANSICXX
 TESTS += test-stdlib-c++
 check_PROGRAMS += test-stdlib-c++
-test_stdlib_c___SOURCES = test-stdlib-c++.cc
+test_stdlib_c___SOURCES = test-stdlib-c++.cc test-stdlib-c++2.cc
 test_stdlib_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME)
 endif
index 37bd2b3..1c9a1e1 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-string.c
 tests/test-string-c++.cc
+tests/test-string-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -15,6 +16,6 @@ check_PROGRAMS += test-string
 if ANSICXX
 TESTS += test-string-c++
 check_PROGRAMS += test-string-c++
-test_string_c___SOURCES = test-string-c++.cc
+test_string_c___SOURCES = test-string-c++.cc test-string-c++2.cc
 test_string_c___LDADD = $(LDADD) $(LIBINTL)
 endif
index cb1d6a5..4555357 100644 (file)
@@ -1,6 +1,7 @@
 Files:
 tests/test-time.c
 tests/test-time-c++.cc
+tests/test-time-c++2.cc
 tests/signature.h
 
 Depends-on:
@@ -15,6 +16,6 @@ check_PROGRAMS += test-time
 if ANSICXX
 TESTS += test-time-c++
 check_PROGRAMS += test-time-c++
-test_time_c___SOURCES = test-time-c++.cc
+test_time_c___SOURCES = test-time-c++.cc test-time-c++2.cc
 test_time_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
 endif
diff --git a/tests/test-locale-c++2.cc b/tests/test-locale-c++2.cc
new file mode 100644 (file)
index 0000000..6c8c57c
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <locale.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <clocale>
diff --git a/tests/test-math-c++2.cc b/tests/test-math-c++2.cc
new file mode 100644 (file)
index 0000000..efc192f
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <math.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <cmath>
diff --git a/tests/test-signal-c++2.cc b/tests/test-signal-c++2.cc
new file mode 100644 (file)
index 0000000..0ec8015
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <signal.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <csignal>
diff --git a/tests/test-stdio-c++2.cc b/tests/test-stdio-c++2.cc
new file mode 100644 (file)
index 0000000..a0f819e
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <stdio.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <cstdio>
diff --git a/tests/test-stdlib-c++2.cc b/tests/test-stdlib-c++2.cc
new file mode 100644 (file)
index 0000000..9967c13
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <stdlib.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <cstdlib>
diff --git a/tests/test-string-c++2.cc b/tests/test-string-c++2.cc
new file mode 100644 (file)
index 0000000..aebb6c6
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <string.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <cstring>
diff --git a/tests/test-time-c++2.cc b/tests/test-time-c++2.cc
new file mode 100644 (file)
index 0000000..d7b2bdd
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <time.h> substitute in C++ mode.
+   Copyright (C) 2010 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <ctime>