mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-23 04:48:58 +08:00
cb584bcf98
2003-07-28 Benjamin Kosnik <bkoz@redhat.com> * testsuite/testsuite_hooks.h: Remove list include. (func_callback): Define as unique type, not std::list. Change DEBUG_ASSERT to _GLIBCXX_ASSERT. * testsuite/libstdc++-v3.dg/dg.exp: Same. * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Same. * testsuite/23_containers/bitset_ctor.cc: * testsuite/17_intro/header_ciso646.cc: Remove DEBUG_ASSERT. * testsuite/18_support/numeric_limits.cc: Same. * testsuite/21_strings/basic_string/append/char/1.cc: Same. * testsuite/21_strings/basic_string/append/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/compare/char/1.cc: Same. * testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/element_access/char/1.cc: Same. * testsuite/21_strings/basic_string/element_access/char/2.cc: Same. * testsuite/21_strings/basic_string/element_access/char/3.cc: Same. * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/element_access/wchar_t/2.cc: Same. * testsuite/21_strings/basic_string/element_access/wchar_t/3.cc: Same. * testsuite/21_strings/basic_string/find/char/1.cc: Same. * testsuite/21_strings/basic_string/find/char/2.cc: Same. * testsuite/21_strings/basic_string/find/char/3.cc: Same. * testsuite/21_strings/basic_string/find/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/find/wchar_t/2.cc: Same. * testsuite/21_strings/basic_string/find/wchar_t/3.cc: Same. * testsuite/21_strings/basic_string/insert/char/1.cc: Same. * testsuite/21_strings/basic_string/insert/char/2.cc: Same. * testsuite/21_strings/basic_string/insert/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/insert/wchar_t/2.cc: Same. * testsuite/21_strings/basic_string/inserters_extractors/char/1.cc: * testsuite/21_strings/basic_string/inserters_extractors/char/4.cc: * testsuite/21_strings/basic_string/inserters_extractors/char/5.cc: * testsuite/21_strings/basic_string/inserters_extractors/char/6.cc: * testsuite/21_strings/basic_string/inserters_extractors/char/7.cc: * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc: * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc: * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc: * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc: * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc: * testsuite/21_strings/basic_string/operators/char/1.cc: Same. * testsuite/21_strings/basic_string/operators/char/2.cc: Same. * testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Same. * testsuite/21_strings/basic_string/replace/char/1.cc: Same. * testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/rfind/char/1.cc: Same. * testsuite/21_strings/basic_string/rfind/char/2.cc: Same. * testsuite/21_strings/basic_string/rfind/char/3.cc: Same. * testsuite/21_strings/basic_string/rfind/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: Same. * testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: Same. * testsuite/21_strings/basic_string/substr/char/1.cc: Same. * testsuite/21_strings/basic_string/substr/wchar_t/1.cc: Same. * testsuite/23_containers/bitset_ctor.cc: Same. * testsuite/23_containers/bitset_shift.cc: Same. * testsuite/23_containers/vector_ctor.cc: Same. * testsuite/23_containers/vector_element_access.cc: Same. * testsuite/24_iterators/istreambuf_iterator.cc: Same. * testsuite/24_iterators/iterator.cc: Same. * testsuite/24_iterators/ostreambuf_iterator.cc: Same. * testsuite/25_algorithms/lower_bound.cc: Same. * testsuite/26_numerics/complex_inserters_extractors.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc: Same. * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc: Same. From-SVN: r69892
120 lines
2.0 KiB
C++
120 lines
2.0 KiB
C++
// 1999-05-20 bkoz
|
|
|
|
// Copyright (C) 1999, 2003 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
|
|
// Free Software Foundation; either version 2, or (at your option)
|
|
// any later version.
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
// with this library; see the file COPYING. If not, write to the Free
|
|
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
// USA.
|
|
|
|
// 17.4.1.2 Headers, ciso646
|
|
|
|
// { dg-do link }
|
|
|
|
#include <ciso646>
|
|
#include <testsuite_hooks.h>
|
|
|
|
|
|
// 2.11 Keywords
|
|
// alternative representations
|
|
// and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
|
|
|
|
// C 2.2.2 Header <iso646.h>
|
|
// The tokens (as above) are keywords and do not appear as macros in <ciso646>.
|
|
|
|
// Test for macros.
|
|
bool test01()
|
|
{
|
|
bool test = true;
|
|
|
|
#if 0
|
|
|
|
#ifdef and
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef and_eq
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef bitand
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef bitor
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef compl
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef not_eq
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef not_or
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef or
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef or_eq
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef xor
|
|
test = false;
|
|
#endif
|
|
|
|
#ifdef xor_eq
|
|
test = false;
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return test;
|
|
}
|
|
|
|
|
|
// Equivalance in usage.
|
|
bool test02()
|
|
{
|
|
bool test = true;
|
|
|
|
bool arg1 = true;
|
|
bool arg2 = false;
|
|
int int1 = 45;
|
|
int int2 = 0;
|
|
|
|
VERIFY( arg1 && int1 );
|
|
VERIFY( arg1 and int1 );
|
|
|
|
VERIFY( (arg1 && arg2) == (arg1 and arg2) );
|
|
VERIFY( (arg1 && int1) == (arg1 and int1) );
|
|
|
|
return test;
|
|
}
|
|
|
|
|
|
int main(void)
|
|
{
|
|
test01();
|
|
test02();
|
|
|
|
return 0;
|
|
}
|