isctype.cc (test01): Replace test for __NEWLIB__ macro with a dejagnu set macro.

* 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.

From-SVN: r220648
This commit is contained in:
Matthew Wahab 2015-02-12 14:55:23 +00:00 committed by Matthew Wahab
parent 825acb30aa
commit 72900b8306
3 changed files with 34 additions and 27 deletions

View File

@ -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

View File

@ -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)));

View File

@ -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)));