This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
- From: Matthew Wahab <matthew dot wahab at arm dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 03 Feb 2015 10:40:49 +0000
- Subject: Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
- Authentication-results: sourceware.org; auth=none
- References: <54CF9C84 dot 4020706 at arm dot com> <54CFA31F dot 9020601 at oracle dot com> <CAH6eHdQNytx0NCcZEPUBorenk+f=8BE86BSGiJ7=FpXZFYuL3A at mail dot gmail dot com> <54D0A034 dot 1040306 at arm dot com> <54D0A291 dot 4010702 at oracle dot com>
On 03/02/15 10:27, Paolo Carlini wrote:
Nit: the path should be * testsuite/28_regex/... and likewise for the
other testcase, because it starts where is the corresponding ChangeLog.
Fixed changelog:
libstdc++-v3/
2015-02-02 Matthew Wahab <matthew.wahab@arm.com>
PR libstdc++/64467
* testsuite/28_regex/traits/char/isctype.cc (test01): Add newlib
special case for '\n'.
* testsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
Ok to commit?
Matthew
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index a7b1396..7c47045 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -53,7 +53,13 @@ test01()
VERIFY(!t.isctype('_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype('\t', t.lookup_classname(range(blank))));
+#if defined (__NEWLIB__)
+ /* newlib includes '\n' in class 'blank'.
+ See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */
+ VERIFY( t.isctype('\n', t.lookup_classname(range(blank))));
+#else
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype('T', t.lookup_classname(range(lower), true)));
#undef range
diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
index e450f6d..1b3d69a 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -50,7 +50,13 @@ test01()
VERIFY(!t.isctype(L'_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(L' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank))));
+#if defined (__NEWLIB__)
+ /* newlib includes '\n' in class 'blank'.
+ See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */
+ VERIFY( t.isctype(L'\n', t.lookup_classname(range(blank))));
+#else
VERIFY(!t.isctype(L'\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype(L't', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype(L'T', t.lookup_classname(range(lower), true)));
#undef range