summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc27
-rw-r--r--libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc28
3 files changed, 34 insertions, 27 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 1661caf572a..394017c84a1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-12 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.
+
2015-02-04 Matthew Wahab <matthew.wahab@arm.com>
PR libstdc++/64467
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index 7c470450550..0a1071c1150 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -1,8 +1,9 @@
-// { dg-do run }
-// { dg-options "-std=gnu++11" }
-
-//
-// 2010-06-23 Stephen M. Webb <stephen.webb@bregmasoft.ca>
+// { 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>
//
// Copyright (C) 2010-2015 Free Software Foundation, Inc.
//
@@ -50,14 +51,14 @@ test01()
VERIFY(!t.isctype('e', t.lookup_classname(range(upper))));
VERIFY( t.isctype('e', t.lookup_classname(range(lower))));
VERIFY(!t.isctype('e', t.lookup_classname(range(nothing))));
- 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('_', t.lookup_classname(range(digit))));
+ VERIFY( t.isctype(' ', t.lookup_classname(range(blank))));
+ VERIFY( t.isctype('\t', t.lookup_classname(range(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
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));
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 1b3d69a758c..6ca5550b8f3 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -1,8 +1,9 @@
-// { dg-do run }
-// { dg-options "-std=gnu++11" }
-
-// Copyright (C) 2010-2015 Free Software Foundation, Inc.
-//
+// { 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.
+//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
@@ -47,15 +48,14 @@ test01()
VERIFY(!t.isctype(L'e', t.lookup_classname(range(upper))));
VERIFY( t.isctype(L'e', t.lookup_classname(range(lower))));
VERIFY(!t.isctype(L'e', t.lookup_classname(range(nothing))));
- 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))));
+ 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 (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 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)));