diff mbox

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

Message ID 54DB3993.7020000@arm.com
State New
Headers show

Commit Message

Matthew Wahab Feb. 11, 2015, 11:14 a.m. UTC
On 10/02/15 08:51, Matthew Wahab wrote:
> On 09/02/15 23:17, Hans-Peter Nilsson wrote:
>> On Mon, 9 Feb 2015, Matthew Wahab wrote:
>>> Attached a patch to replace the test for macro __NEWLIB__ with a test for
>>> macro NEWLINE_IN_CLASS_BLANK, defined by
>>>    { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
>>>
>>> Tested with check-target-libstdc++-v3, with the modified tests, for
>>> arm-none-eabi and aarch64-none-linux-gnu.
>>>
>>> Does this look ok to commit?
>>
>> Not valid for approval, but that's what I meant!
>> Modulo the typo forgetting to
>> s/__NEWLIB__/NEWLINE_IN_CLASS_BLANK/ in the ifdef in
>> wchar_t/isctype.cc of course.

Attached the fixed patch.
Tested by running check-target-libstdc++-v3, with the modified tests, 
for arm-none-eabi and aarch64-none-linux-gnu.

Ok to commit?
Matthew

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

	* testsuite/28_regex/traits/char/isctype.cc (test01): Replace test
	for __NEWLIB__ macro with a dejagnu set macro.
	* testsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.

Comments

Jonathan Wakely Feb. 11, 2015, 3:43 p.m. UTC | #1
On 11/02/15 11:14 +0000, Matthew Wahab wrote:
>Attached the fixed patch.
>Tested by running check-target-libstdc++-v3, with the modified tests, 
>for arm-none-eabi and aarch64-none-linux-gnu.
>
>Ok to commit?

OK, thanks.
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 7c47045..b6fd6ff 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -1,5 +1,6 @@ 
 // { dg-do run }
 // { dg-options "-std=gnu++11" }
+// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
 
 //
 // 2010-06-23  Stephen M. Webb <stephen.webb@bregmasoft.ca>
@@ -53,8 +54,8 @@  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'.
+#if defined (NEWLINE_IN_CLASS_BLANK)
+  /* On some targets, '\n' is 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
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 1b3d69a..144d679 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -1,5 +1,6 @@ 
 // { dg-do run }
 // { dg-options "-std=gnu++11" }
+// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
 
 // Copyright (C) 2010-2015 Free Software Foundation, Inc.
 //
@@ -50,8 +51,8 @@  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'.
+#if defined (NEWLINE_IN_CLASS_BLANK)
+  /* On some targets, '\n' is 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