diff mbox

[libstdc++,Testsuite] isctype test fails for newlib.

Message ID 54D0A034.1040306@arm.com
State New
Headers show

Commit Message

Matthew Wahab Feb. 3, 2015, 10:17 a.m. UTC
[Email problems so resending to the list, sorry for multiple copies.]

On 02/02/15 16:33, Jonathan Wakely wrote:
> On 2 February 2015 at 16:17, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>
> This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467 so please
> note that in the ChangeLog.
>
>> I guess the patch is Ok for trunk, but please also add in the comment a link
>> to this message of yours, that is
>> https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html.

Updated patch attached and changelog below.

> Yes, not everyone subscribes to gcc-patches so please always send
> libstdc++ patches to the libstdc++ list, as documented at
> https://gcc.gnu.org/lists.html and in the libstdc++ manual.

Noted, sorry about that.
Matthew

libstdc++-v3/testsuite/
2015-02-02  Matthew Wahab  <matthew.wahab@arm.com>

	PR libstdc++/64467
	* 28_regex/traits/char/isctype.cc (test01): Add newlib special
	case for '\n'.
	* 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.

Comments

Paolo Carlini Feb. 3, 2015, 10:27 a.m. UTC | #1
Hi,

On 02/03/2015 11:17 AM, Matthew Wahab wrote:
> libstdc++-v3/testsuite/
> 2015-02-02  Matthew Wahab  <matthew.wahab@arm.com>
>
>     PR libstdc++/64467
>     * 28_regex/traits/char/isctype.cc (test01): Add newlib special
>     case for '\n'.
>     * 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
Nit: the path should be * testsuite/28_regex/... and likewise for the 
other testcase, because it starts where is the corresponding ChangeLog.

Paolo
diff mbox

Patch

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