mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 16:35:19 +08:00
[multiple changes]
2007-12-10 Paolo Carlini <pcarlini@suse.de> * testsuite/25_algorithms/nth_element/2.cc: Avoid -Wall warnings. * testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_streambuf/sgetc/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sgetn/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/snextc/char/1.cc: Likewise. * testsuite/27_io/basic_istream/peek/wchar_t/12296.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/ 28277-2.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/ 28277-3.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/ 28277-4.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/char/ 28277-3.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/char/ 28277-4.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Likewise. * testsuite/18_support/headers/cstddef/macros.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/ wchar_t/28277.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/ char/28277.cc: Likewise. * testsuite/26_numerics/headers/cmath/25913.cc: Likewise. * testsuite/ext/pb_ds/example/priority_queue_xref.cc: Likewise. * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: Likewise. * testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise. * testsuite/ext/enc_filebuf/char/13598.cc: Likewise. * testsuite/22_locale/collate/compare/char/2.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise. * testsuite/22_locale/time_put/put/char/5.cc: Likewise. * testsuite/22_locale/time_put/put/char/6.cc: Likewise. * testsuite/22_locale/time_put/put/char/7.cc: Likewise. * testsuite/22_locale/time_put/put/char/8.cc: Likewise. * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise. * testsuite/22_locale/codecvt/length/char/1.cc: Likewise. * testsuite/22_locale/codecvt/length/char/2.cc: Likewise. * testsuite/22_locale/codecvt/in/wchar_t/9.cc: Likewise. * testsuite/22_locale/codecvt/in/char/1.cc: Likewise. * testsuite/22_locale/codecvt/out/char/1.cc: Likewise. * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise. * testsuite/22_locale/num_get/get/char/1.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/uniform_int/ 33128.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/ mutex_weaktoshared.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/ default_weaktoshared.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ range.cc: Likewise. * testsuite/23_containers/multimap/operations/1.cc: Likewise. * testsuite/23_containers/set/operations/1.cc: Likewise. * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise. * testsuite/23_containers/deque/modifiers/erase/1.cc: Likewise. * testsuite/23_containers/deque/modifiers/erase/2.cc: Likewise. * testsuite/23_containers/multiset/operations/1.cc: Likewise. * testsuite/23_containers/map/operations/1.cc: Likewise. * testsuite/util/testsuite_hooks.cc: Likewise. * testsuite/util/testsuite_rvalref.h: Likewise. 2007-12-10 Jakub Jelinek <jakub@redhat.com> * include/ext/throw_allocator.h (print_to_string): Change sprintf format to %lu and cast ref.second.{first,second} to long. * include/debug/safe_iterator.tcc (_M_can_advance): Add parens to avoid warnings. From-SVN: r130743
This commit is contained in:
parent
502630f495
commit
7919bb2fba
@ -1,3 +1,82 @@
|
||||
2007-12-10 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* testsuite/25_algorithms/nth_element/2.cc: Avoid -Wall warnings.
|
||||
* testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_streambuf/sgetc/char/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_stringbuf/sgetn/char/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_stringbuf/snextc/char/1.cc: Likewise.
|
||||
* testsuite/27_io/basic_istream/peek/wchar_t/12296.cc: Likewise.
|
||||
* testsuite/27_io/basic_ostream/inserters_character/wchar_t/
|
||||
28277-2.cc: Likewise.
|
||||
* testsuite/27_io/basic_ostream/inserters_character/wchar_t/
|
||||
28277-3.cc: Likewise.
|
||||
* testsuite/27_io/basic_ostream/inserters_character/wchar_t/
|
||||
28277-4.cc: Likewise.
|
||||
* testsuite/27_io/basic_ostream/inserters_character/char/
|
||||
28277-3.cc: Likewise.
|
||||
* testsuite/27_io/basic_ostream/inserters_character/char/
|
||||
28277-4.cc: Likewise.
|
||||
* testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise.
|
||||
* testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Likewise.
|
||||
* testsuite/18_support/headers/cstddef/macros.cc: Likewise.
|
||||
* testsuite/21_strings/basic_string/inserters_extractors/
|
||||
wchar_t/28277.cc: Likewise.
|
||||
* testsuite/21_strings/basic_string/inserters_extractors/
|
||||
char/28277.cc: Likewise.
|
||||
* testsuite/26_numerics/headers/cmath/25913.cc: Likewise.
|
||||
* testsuite/ext/pb_ds/example/priority_queue_xref.cc: Likewise.
|
||||
* testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: Likewise.
|
||||
* testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise.
|
||||
* testsuite/ext/enc_filebuf/char/13598.cc: Likewise.
|
||||
* testsuite/22_locale/collate/compare/char/2.cc: Likewise.
|
||||
* testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
|
||||
* testsuite/22_locale/time_put/put/char/5.cc: Likewise.
|
||||
* testsuite/22_locale/time_put/put/char/6.cc: Likewise.
|
||||
* testsuite/22_locale/time_put/put/char/7.cc: Likewise.
|
||||
* testsuite/22_locale/time_put/put/char/8.cc: Likewise.
|
||||
* testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
|
||||
* testsuite/22_locale/codecvt/length/char/1.cc: Likewise.
|
||||
* testsuite/22_locale/codecvt/length/char/2.cc: Likewise.
|
||||
* testsuite/22_locale/codecvt/in/wchar_t/9.cc: Likewise.
|
||||
* testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
|
||||
* testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
|
||||
* testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
|
||||
* testsuite/22_locale/num_get/get/char/1.cc: Likewise.
|
||||
* testsuite/tr1/5_numerical_facilities/random/uniform_int/
|
||||
33128.cc: Likewise.
|
||||
* testsuite/tr1/2_general_utilities/shared_ptr/thread/
|
||||
mutex_weaktoshared.cc: Likewise.
|
||||
* testsuite/tr1/2_general_utilities/shared_ptr/thread/
|
||||
default_weaktoshared.cc: Likewise.
|
||||
* testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
|
||||
range.cc: Likewise.
|
||||
* testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
|
||||
range.cc: Likewise.
|
||||
* testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
|
||||
range.cc: Likewise.
|
||||
* testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
|
||||
range.cc: Likewise.
|
||||
* testsuite/23_containers/multimap/operations/1.cc: Likewise.
|
||||
* testsuite/23_containers/set/operations/1.cc: Likewise.
|
||||
* testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise.
|
||||
* testsuite/23_containers/deque/modifiers/erase/1.cc: Likewise.
|
||||
* testsuite/23_containers/deque/modifiers/erase/2.cc: Likewise.
|
||||
* testsuite/23_containers/multiset/operations/1.cc: Likewise.
|
||||
* testsuite/23_containers/map/operations/1.cc: Likewise.
|
||||
* testsuite/util/testsuite_hooks.cc: Likewise.
|
||||
* testsuite/util/testsuite_rvalref.h: Likewise.
|
||||
|
||||
2007-12-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/ext/throw_allocator.h (print_to_string): Change sprintf
|
||||
format to %lu and cast ref.second.{first,second} to long.
|
||||
* include/debug/safe_iterator.tcc (_M_can_advance): Add parens to
|
||||
avoid warnings.
|
||||
|
||||
2007-12-09 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* docs/html/ext/howto.html: Update.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Debugging iterator implementation (out of line) -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2003, 2004, 2005, 2006
|
||||
// Copyright (C) 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -54,8 +54,8 @@ namespace __gnu_debug
|
||||
static_cast<const _Sequence*>(_M_sequence)->begin();
|
||||
std::pair<difference_type, _Distance_precision> __dist =
|
||||
this->_M_get_distance(__begin, *this);
|
||||
bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n
|
||||
|| __dist.second != __dp_exact && __dist.first > 0);
|
||||
bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n)
|
||||
|| (__dist.second != __dp_exact && __dist.first > 0));
|
||||
return __ok;
|
||||
}
|
||||
else
|
||||
@ -64,8 +64,8 @@ namespace __gnu_debug
|
||||
static_cast<const _Sequence*>(_M_sequence)->end();
|
||||
std::pair<difference_type, _Distance_precision> __dist =
|
||||
this->_M_get_distance(*this, __end);
|
||||
bool __ok = (__dist.second == __dp_exact && __dist.first >= __n
|
||||
|| __dist.second != __dp_exact && __dist.first > 0);
|
||||
bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n)
|
||||
|| (__dist.second != __dp_exact && __dist.first > 0));
|
||||
return __ok;
|
||||
}
|
||||
}
|
||||
|
@ -430,15 +430,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
char buf[40];
|
||||
const char tab('\t');
|
||||
s += "address: ";
|
||||
sprintf(buf, "%p", ref.first);
|
||||
__builtin_sprintf(buf, "%p", ref.first);
|
||||
s += buf;
|
||||
s += tab;
|
||||
s += "label: ";
|
||||
sprintf(buf, "%u", ref.second.first);
|
||||
unsigned long l = static_cast<unsigned long>(ref.second.first);
|
||||
__builtin_sprintf(buf, "%lu", l);
|
||||
s += buf;
|
||||
s += tab;
|
||||
s += "size: ";
|
||||
sprintf(buf, "%u", ref.second.second);
|
||||
l = static_cast<unsigned long>(ref.second.second);
|
||||
__builtin_sprintf(buf, "%lu", l);
|
||||
s += buf;
|
||||
s += '\n';
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
// { dg-do compile }
|
||||
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// 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
|
||||
@ -42,7 +43,7 @@ namespace gnu
|
||||
void test02()
|
||||
{
|
||||
// Must not be (void*)0
|
||||
const int j = NULL;
|
||||
const int j __attribute__((unused)) = NULL;
|
||||
|
||||
#ifndef NULL
|
||||
#error "NULL_must_be_a_macro"
|
||||
|
@ -26,7 +26,6 @@
|
||||
int main()
|
||||
{
|
||||
bool test __attribute__((unused)) = true;
|
||||
bool b;
|
||||
|
||||
// 1
|
||||
std::error_code e1;
|
||||
|
@ -28,7 +28,7 @@ int main()
|
||||
std::error_code e;
|
||||
int i = e;
|
||||
|
||||
return 0;
|
||||
return i;
|
||||
}
|
||||
|
||||
// { dg-error "invalid conversion" "" { target *-*-* } 29 }
|
||||
|
@ -1,7 +1,8 @@
|
||||
// { dg-do compile }
|
||||
// 2001-06-18 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// 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
|
||||
@ -28,7 +29,6 @@ void test01()
|
||||
using namespace std;
|
||||
|
||||
// Check for required typedefs
|
||||
long l;
|
||||
typedef raw_storage_iterator<long*, long> test_iterator;
|
||||
typedef test_iterator::value_type value_type;
|
||||
typedef test_iterator::difference_type difference_type;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -39,7 +39,7 @@ void test01()
|
||||
oss_01 << str_01;
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == string::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -39,7 +39,7 @@ void test01()
|
||||
oss_01 << str_01;
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == wstring::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -36,7 +36,7 @@ void test01()
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* c_lit = "black pearl jasmine tea";
|
||||
const char* from_next;
|
||||
int size = 25;
|
||||
int size = 23;
|
||||
char* c_arr = new char[size];
|
||||
char* c_ref = new char[size];
|
||||
char* to_next;
|
||||
|
@ -128,9 +128,6 @@ void test09()
|
||||
r1 = cvt->in(state01, efrom, e_lit + i, efrom_next,
|
||||
ito, i_arr + esize, ito_next);
|
||||
|
||||
printf("%d %d %d %x %x\n", efrom - e_lit, i, efrom_next - e_lit,
|
||||
efrom[-1], ito[-1]);
|
||||
|
||||
// It it not clear if partial should ever be returned here
|
||||
// (see DR 382).
|
||||
VERIFY( r1 == codecvt_base::ok || r1 == codecvt_base::partial );
|
||||
|
@ -33,7 +33,7 @@ void test01()
|
||||
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* c_lit = "black pearl jasmine tea";
|
||||
int size = 25;
|
||||
int size = 23;
|
||||
|
||||
locale loc = locale::classic();
|
||||
c_codecvt::state_type state;
|
||||
|
@ -51,7 +51,7 @@ void test02()
|
||||
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* c_lit = "black pearl jasmine tea";
|
||||
int size = 25;
|
||||
int size = 23;
|
||||
|
||||
locale loc (locale::classic(), new length_codecvt);
|
||||
c_codecvt::state_type state;
|
||||
|
@ -36,7 +36,7 @@ void test01()
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* c_lit = "black pearl jasmine tea";
|
||||
const char* from_next;
|
||||
int size = 25;
|
||||
int size = 23;
|
||||
char* c_arr = new char[size];
|
||||
char* c_ref = new char[size];
|
||||
char* to_next;
|
||||
|
@ -36,7 +36,7 @@ void test01()
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* c_lit = "black pearl jasmine tea";
|
||||
const char* from_next;
|
||||
int size = 25;
|
||||
int size = 23;
|
||||
char* c_arr = new char[size];
|
||||
char* c_ref = new char[size];
|
||||
char* to_next;
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -48,19 +49,17 @@ void test02()
|
||||
|
||||
// int compare(const charT*, const charT*, const charT*, const charT*) const
|
||||
|
||||
const char* strlit1 = "monkey picked tikuanyin oolong";
|
||||
const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
|
||||
const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
|
||||
|
||||
int i1;
|
||||
int i2;
|
||||
int size1 = char_traits<char>::length(strlit1) - 1;
|
||||
int size3 = char_traits<char>::length(strlit3) - 1;
|
||||
int size4 = char_traits<char>::length(strlit4) - 1;
|
||||
|
||||
i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
|
||||
VERIFY ( i1 == 1 );
|
||||
i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
|
||||
i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size3);
|
||||
VERIFY ( i1 == -1 );
|
||||
i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
|
||||
VERIFY ( i1 == 0 );
|
||||
|
@ -45,7 +45,6 @@ void test01()
|
||||
bool b1 = true;
|
||||
bool b0 = false;
|
||||
unsigned long ul1 = 1294967294;
|
||||
unsigned long ul2 = 0;
|
||||
unsigned long ul;
|
||||
double d1 = 1.02345e+308;
|
||||
double d2 = 3.15e-308;
|
||||
|
@ -45,7 +45,6 @@ void test01()
|
||||
bool b1 = true;
|
||||
bool b0 = false;
|
||||
unsigned long ul1 = 1294967294;
|
||||
unsigned long ul2 = 0;
|
||||
unsigned long ul;
|
||||
double d1 = 1.02345e+308;
|
||||
double d2 = 3.15e-308;
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -52,8 +53,9 @@ void test05()
|
||||
date, date + traits::length(date));
|
||||
string result5 = oss.str();
|
||||
VERIFY( result5 == "Sunday, the second of April");
|
||||
iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
|
||||
date_ex, date_ex + traits::length(date));
|
||||
iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
|
||||
date_ex,
|
||||
date_ex + traits::length(date_ex));
|
||||
string result6 = oss.str();
|
||||
VERIFY( result6 != result5 );
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -55,7 +56,8 @@ void test06()
|
||||
string result7 = oss.str();
|
||||
VERIFY( result7 == "Sonntag, the second of April");
|
||||
iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
|
||||
date_ex, date_ex + traits::length(date));
|
||||
date_ex,
|
||||
date_ex + traits::length(date_ex));
|
||||
string result8 = oss.str();
|
||||
VERIFY( result8 != result7 );
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -55,7 +56,8 @@ void test07()
|
||||
string result9 = oss.str();
|
||||
VERIFY( result9 == "Sunday, the second of April");
|
||||
iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
|
||||
date_ex, date_ex + traits::length(date));
|
||||
date_ex,
|
||||
date_ex + traits::length(date_ex));
|
||||
string result10 = oss.str();
|
||||
VERIFY( result10 != result9 );
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -54,7 +55,8 @@ void test08()
|
||||
string result11 = oss.str();
|
||||
VERIFY( result11 == "dimanche, the second of avril");
|
||||
iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
|
||||
date_ex, date_ex + traits::length(date));
|
||||
date_ex,
|
||||
date_ex + traits::length(date_ex));
|
||||
string result12 = oss.str();
|
||||
VERIFY( result12 != result11 );
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -54,8 +55,9 @@ void test05()
|
||||
date, date + traits::length(date));
|
||||
wstring result5 = oss.str();
|
||||
VERIFY( result5 == L"Sunday, the second of April");
|
||||
iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
|
||||
date_ex, date_ex + traits::length(date));
|
||||
iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
|
||||
date_ex,
|
||||
date_ex + traits::length(date_ex));
|
||||
wstring result6 = oss.str();
|
||||
VERIFY( result6 != result5 );
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007 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
|
||||
@ -29,12 +29,12 @@ const int A2[] = {0, 2, 3, 4, 10, 11, 12, 13, 14, 15};
|
||||
const int A3[] = {0, 2, 3, 4, 10, 11};
|
||||
const int A4[] = {4, 10, 11};
|
||||
const int A5[] = {4, 10};
|
||||
const int N = sizeof(A) / sizeof(int);
|
||||
const int N1 = sizeof(A1) / sizeof(int);
|
||||
const int N2 = sizeof(A2) / sizeof(int);
|
||||
const int N3 = sizeof(A3) / sizeof(int);
|
||||
const int N4 = sizeof(A4) / sizeof(int);
|
||||
const int N5 = sizeof(A5) / sizeof(int);
|
||||
const unsigned N = sizeof(A) / sizeof(int);
|
||||
const unsigned N1 = sizeof(A1) / sizeof(int);
|
||||
const unsigned N2 = sizeof(A2) / sizeof(int);
|
||||
const unsigned N3 = sizeof(A3) / sizeof(int);
|
||||
const unsigned N4 = sizeof(A4) / sizeof(int);
|
||||
const unsigned N5 = sizeof(A5) / sizeof(int);
|
||||
|
||||
void
|
||||
test01()
|
||||
@ -85,17 +85,17 @@ test02()
|
||||
typedef deque_type::iterator iterator_type;
|
||||
|
||||
deque_type v, v1, v2, v3, v4, v5;
|
||||
for (int i = 0; i < N; ++i)
|
||||
for (unsigned i = 0; i < N; ++i)
|
||||
v.push_back(std::deque<int>(1, A[i]));
|
||||
for (int i = 0; i < N1; ++i)
|
||||
for (unsigned i = 0; i < N1; ++i)
|
||||
v1.push_back(std::deque<int>(1, A1[i]));
|
||||
for (int i = 0; i < N2; ++i)
|
||||
for (unsigned i = 0; i < N2; ++i)
|
||||
v2.push_back(std::deque<int>(1, A2[i]));
|
||||
for (int i = 0; i < N3; ++i)
|
||||
for (unsigned i = 0; i < N3; ++i)
|
||||
v3.push_back(std::deque<int>(1, A3[i]));
|
||||
for (int i = 0; i < N4; ++i)
|
||||
for (unsigned i = 0; i < N4; ++i)
|
||||
v4.push_back(std::deque<int>(1, A4[i]));
|
||||
for (int i = 0; i < N5; ++i)
|
||||
for (unsigned i = 0; i < N5; ++i)
|
||||
v5.push_back(std::deque<int>(1, A5[i]));
|
||||
|
||||
iterator_type it1 = v.erase(v.begin() + 1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007 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
|
||||
@ -32,14 +32,14 @@ const int A3[] = {-5, 0, 1, 2, 8, 9, 10, 11};
|
||||
const int A4[] = {2, 8, 9, 10, 11};
|
||||
const int A5[] = {2, 8, 10, 11};
|
||||
const int A6[] = {2, 8, 10};
|
||||
const int N = sizeof(A) / sizeof(int);
|
||||
const int N0 = sizeof(A0) / sizeof(int);
|
||||
const int N1 = sizeof(A1) / sizeof(int);
|
||||
const int N2 = sizeof(A2) / sizeof(int);
|
||||
const int N3 = sizeof(A3) / sizeof(int);
|
||||
const int N4 = sizeof(A4) / sizeof(int);
|
||||
const int N5 = sizeof(A5) / sizeof(int);
|
||||
const int N6 = sizeof(A6) / sizeof(int);
|
||||
const unsigned N = sizeof(A) / sizeof(int);
|
||||
const unsigned N0 = sizeof(A0) / sizeof(int);
|
||||
const unsigned N1 = sizeof(A1) / sizeof(int);
|
||||
const unsigned N2 = sizeof(A2) / sizeof(int);
|
||||
const unsigned N3 = sizeof(A3) / sizeof(int);
|
||||
const unsigned N4 = sizeof(A4) / sizeof(int);
|
||||
const unsigned N5 = sizeof(A5) / sizeof(int);
|
||||
const unsigned N6 = sizeof(A6) / sizeof(int);
|
||||
|
||||
template<int Size>
|
||||
class My_class
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2006, 2007 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
|
||||
@ -128,6 +128,7 @@ void test01()
|
||||
VERIFY( pp0.second == irt1.first );
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
test01();
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2006, 2007 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
|
||||
@ -127,6 +127,7 @@ void test01()
|
||||
VERIFY( pp0.second == iter1 );
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
test01();
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2006, 2007 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
|
||||
@ -126,6 +126,7 @@ void test01()
|
||||
VERIFY( pp0.second == iter1 );
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
test01();
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2006, 2007 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
|
||||
@ -127,6 +127,7 @@ void test01()
|
||||
VERIFY( pp0.second == irt1.first );
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
test01();
|
||||
|
@ -39,8 +39,10 @@ void test01()
|
||||
// Actually, vector<bool> is special, see libstdc++/31370.
|
||||
vector<bool> vb;
|
||||
typedef vector<bool>::difference_type difference_type;
|
||||
typedef vector<bool>::size_type size_type;
|
||||
VERIFY( vb.max_size()
|
||||
== (numeric_limits<difference_type>::max() - int(_S_word_bit) + 1) );
|
||||
== size_type(numeric_limits<difference_type>::max()
|
||||
- int(_S_word_bit) + 1) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2006, 2007 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
|
||||
@ -23,27 +23,27 @@
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
void
|
||||
test_set(std::vector<int>& v, int size)
|
||||
test_set(std::vector<unsigned>& v, unsigned size)
|
||||
{
|
||||
v.clear();
|
||||
|
||||
for (int i = 0; i < size; i += 4)
|
||||
for (unsigned i = 0; i < size; i += 4)
|
||||
{
|
||||
v.push_back(i / 2);
|
||||
v.push_back((size - 2) - (i / 2));
|
||||
}
|
||||
for (int i = 1; i < size; i += 2)
|
||||
for (unsigned i = 1; i < size; i += 2)
|
||||
v.push_back(i);
|
||||
}
|
||||
|
||||
void
|
||||
do_test01(int size)
|
||||
do_test01(unsigned size)
|
||||
{
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::vector<int> v, s;
|
||||
std::vector<unsigned> v, s;
|
||||
|
||||
for (int j = 0; j < size; ++j)
|
||||
for (unsigned j = 0; j < size; ++j)
|
||||
{
|
||||
test_set(v, size);
|
||||
s = v;
|
||||
@ -53,10 +53,10 @@ do_test01(int size)
|
||||
|
||||
VERIFY( v[j] == s[j] );
|
||||
|
||||
for (int i = 0; i < j; ++i)
|
||||
for (unsigned i = 0; i < j; ++i)
|
||||
VERIFY( !(v[j] < v[i]) );
|
||||
|
||||
for (int i = j; i < v.size(); ++i)
|
||||
for (unsigned i = j; i < v.size(); ++i)
|
||||
VERIFY( !(v[i] < v[j]) );
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ do_test01(int size)
|
||||
void
|
||||
test01()
|
||||
{
|
||||
for (int size = 4; size <= 1 << 10; size <<= 1)
|
||||
for (unsigned size = 4; size <= 1 << 10; size <<= 1)
|
||||
do_test01(size);
|
||||
}
|
||||
|
||||
|
@ -43,5 +43,5 @@ bool isnormal(const employee&)
|
||||
void test01()
|
||||
{
|
||||
manager m;
|
||||
bool b = isnormal(m);
|
||||
isnormal(m);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2004 Free Software Foundation
|
||||
// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -30,7 +30,7 @@ void test01()
|
||||
wistringstream stream;
|
||||
VERIFY( stream.rdstate() == ios_base::goodbit );
|
||||
wistringstream::int_type c = stream.peek();
|
||||
VERIFY( c == istringstream::traits_type::eof() );
|
||||
VERIFY( c == wistringstream::traits_type::eof() );
|
||||
VERIFY( stream.rdstate() == ios_base::eofbit );
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2006 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -38,7 +38,7 @@ void test01()
|
||||
oss_01 << 'a';
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == string::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -39,7 +39,7 @@ void test01()
|
||||
oss_01 << str_01.c_str();
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == string::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -39,7 +39,7 @@ void test01()
|
||||
oss_01 << str_01.c_str();
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == wstring::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -38,7 +38,7 @@ void test01()
|
||||
oss_01 << L'a';
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == wstring::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
// Copyright (C) 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -39,7 +39,7 @@ void test01()
|
||||
oss_01 << str_01.c_str();
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == wstring::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -106,11 +106,11 @@ void test01()
|
||||
buf01.pub_setg(lit01, lit01, (lit01 + i01));
|
||||
VERIFY( i01 == buf01.in_avail() );
|
||||
|
||||
VERIFY( buf01.pub_uflow() == lit01[0] );
|
||||
VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[0]) );
|
||||
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[1]) );
|
||||
VERIFY( buf01.pub_uflow() == lit01[1] );
|
||||
VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[1]) );
|
||||
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[2]) );
|
||||
VERIFY( buf01.pub_uflow() == lit01[2] );
|
||||
VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[2]) );
|
||||
VERIFY( buf01.sgetc() == traits_type::eof() );
|
||||
}
|
||||
|
||||
|
@ -106,11 +106,11 @@ void test01()
|
||||
buf01.pub_setg(lit01, lit01, (lit01 + i01));
|
||||
VERIFY( i01 == buf01.in_avail() );
|
||||
|
||||
VERIFY( buf01.pub_uflow() == lit01[0] );
|
||||
VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[0]) );
|
||||
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[1]) );
|
||||
VERIFY( buf01.pub_uflow() == lit01[1] );
|
||||
VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[1]) );
|
||||
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[2]) );
|
||||
VERIFY( buf01.pub_uflow() == lit01[2] );
|
||||
VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[2]) );
|
||||
VERIFY( buf01.sgetc() == traits_type::eof() );
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -47,8 +48,8 @@ void test04()
|
||||
int_type c1 = strb_01.sbumpc();
|
||||
int_type c2 = strb_02.sbumpc();
|
||||
VERIFY( c1 != c2 );
|
||||
VERIFY( c1 == str_01[0] );
|
||||
VERIFY( c2 == str_02[0] ); //should equal first letter at this point
|
||||
VERIFY( c1 == traits_type::to_int_type(str_01[0]) );
|
||||
VERIFY( c2 == traits_type::to_int_type(str_02[0]) ); //should equal first letter at this point
|
||||
int_type c3 = strb_01.sbumpc();
|
||||
int_type c4 = strb_02.sbumpc();
|
||||
VERIFY( c1 != c2 );
|
||||
|
@ -47,8 +47,8 @@ void test04()
|
||||
int_type c1 = strb_01.sbumpc();
|
||||
int_type c2 = strb_02.sbumpc();
|
||||
VERIFY( c1 != c2 );
|
||||
VERIFY( c1 == str_01[0] );
|
||||
VERIFY( c2 == str_02[0] ); //should equal first letter at this point
|
||||
VERIFY( c1 == traits_type::to_int_type(str_01[0]) );
|
||||
VERIFY( c2 == traits_type::to_int_type(str_02[0]) ); //should equal first letter at this point
|
||||
int_type c3 = strb_01.sbumpc();
|
||||
int_type c4 = strb_02.sbumpc();
|
||||
VERIFY( c1 != c2 );
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
// 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -83,8 +84,8 @@ void test04()
|
||||
c2 = strb_02.sgetc();
|
||||
VERIFY( c6 == c1 ); //just by co-incidence both o's
|
||||
VERIFY( c7 != c2 ); // n != i
|
||||
VERIFY( c1 == str_01[13] );
|
||||
VERIFY( c2 == str_02[13] ); //should equal fourteenth letter at this point
|
||||
VERIFY( c1 == traits_type::to_int_type(str_01[13]) );
|
||||
VERIFY( c2 == traits_type::to_int_type(str_02[13]) ); //should equal fourteenth letter at this point
|
||||
strmsz_1 = strb_03.sgetn(carray1, 10);
|
||||
VERIFY( !strmsz_1 ); //zero
|
||||
strmsz_1 = strb_02.in_avail();
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -83,8 +84,8 @@ void test04()
|
||||
c2 = strb_02.sgetc();
|
||||
VERIFY( c6 == c1 ); //just by co-incidence both o's
|
||||
VERIFY( c7 != c2 ); // n != i
|
||||
VERIFY( c1 == str_01[13] );
|
||||
VERIFY( c2 == str_02[13] ); //should equal fourteenth letter at this point
|
||||
VERIFY( c1 == traits_type::to_int_type(str_01[13]) );
|
||||
VERIFY( c2 == traits_type::to_int_type(str_02[13]) ); //should equal fourteenth letter at this point
|
||||
strmsz_1 = strb_03.sgetn(carray1, 10);
|
||||
VERIFY( !strmsz_1 ); //zero
|
||||
strmsz_1 = strb_02.in_avail();
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -62,8 +63,8 @@ void test04()
|
||||
c7 = strb_02.snextc();
|
||||
VERIFY( c6 != c8 );
|
||||
VERIFY( c7 != c9 );
|
||||
VERIFY( c6 == str_01[3] );
|
||||
VERIFY( c7 == str_02[3] ); //should equal fourth letter at this point
|
||||
VERIFY( c6 == traits_type::to_int_type(str_01[3]) );
|
||||
VERIFY( c7 == traits_type::to_int_type(str_02[3]) ); //should equal fourth letter at this point
|
||||
c5 = strb_03.snextc();
|
||||
VERIFY( c5 == traits_type::eof() );
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
// 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -62,8 +63,8 @@ void test04()
|
||||
c7 = strb_02.snextc();
|
||||
VERIFY( c6 != c8 );
|
||||
VERIFY( c7 != c9 );
|
||||
VERIFY( c6 == str_01[3] );
|
||||
VERIFY( c7 == str_02[3] ); //should equal fourth letter at this point
|
||||
VERIFY( c6 == traits_type::to_int_type(str_01[3]) );
|
||||
VERIFY( c7 == traits_type::to_int_type(str_02[3]) ); //should equal fourth letter at this point
|
||||
c5 = strb_03.snextc();
|
||||
VERIFY( c5 == traits_type::eof() );
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-require-iconv "ISO-8859-1" }
|
||||
|
||||
// Copyright (C) 2004, 2007 Free Software Foundation
|
||||
// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@ -20,6 +20,7 @@
|
||||
|
||||
#include <locale>
|
||||
#include <cstring>
|
||||
#include <cstddef>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <ext/enc_filebuf.h>
|
||||
|
||||
@ -41,8 +42,8 @@ int main()
|
||||
std::streamsize n = fb.sputn(str, std::strlen(str));
|
||||
int s = fb.pubsync();
|
||||
fb.close();
|
||||
|
||||
VERIFY( n == std::strlen(str) );
|
||||
|
||||
VERIFY( std::size_t(n) == std::strlen(str) );
|
||||
VERIFY( s == 0 );
|
||||
|
||||
return 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007 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
|
||||
@ -80,7 +80,7 @@ public:
|
||||
push(const int& r_str);
|
||||
|
||||
// Returns a const reference to the largest int in the container.
|
||||
const int
|
||||
int
|
||||
top() const
|
||||
{
|
||||
assert(!empty());
|
||||
|
@ -38,7 +38,7 @@ void test01()
|
||||
oss_01 << str_01;
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == __gnu_cxx::__vstring::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -38,7 +38,7 @@ void test01()
|
||||
oss_01 << str_01;
|
||||
|
||||
VERIFY( oss_01.good() );
|
||||
VERIFY( oss_01.str().size() == width );
|
||||
VERIFY( oss_01.str().size() == __gnu_cxx::__wvstring::size_type(width) );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -162,7 +162,7 @@ test01()
|
||||
#endif
|
||||
|
||||
pthread_attr_t tattr;
|
||||
int ret = pthread_attr_init(&tattr);
|
||||
pthread_attr_init(&tattr);
|
||||
|
||||
shared_and_weak_pools pools(obj_pool, weak_pool[0]);
|
||||
pthread_create(threads, &tattr, thread_hammer_and_kill, reinterpret_cast<void*>(&pools));
|
||||
|
@ -164,7 +164,7 @@ test01()
|
||||
#endif
|
||||
|
||||
pthread_attr_t tattr;
|
||||
int ret = pthread_attr_init(&tattr);
|
||||
pthread_attr_init(&tattr);
|
||||
|
||||
shared_and_weak_pools pools(obj_pool, weak_pool[0]);
|
||||
pthread_create(threads, &tattr, thread_hammer_and_kill, reinterpret_cast<void*>(&pools));
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
// libstdc++/33128
|
||||
int test01()
|
||||
void test01()
|
||||
{
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
|
@ -32,7 +32,7 @@ void test01()
|
||||
|
||||
char s[] = "a+b|c";
|
||||
test_type re;
|
||||
re.assign(s, s + sizeof(s));
|
||||
re.assign(s, s + 5);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -32,7 +32,7 @@ void test01()
|
||||
|
||||
wchar_t s[] = L"a+b|c";
|
||||
test_type re;
|
||||
re.assign(s, s + sizeof(s));
|
||||
re.assign(s, s + 5);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -31,7 +31,7 @@ void test01()
|
||||
typedef std::tr1::basic_regex<char> test_type;
|
||||
|
||||
char s[] = "a+b|c";
|
||||
test_type re(s, s + sizeof(s));
|
||||
test_type re(s, s + 5);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -31,7 +31,7 @@ void test01()
|
||||
typedef std::tr1::basic_regex<wchar_t> test_type;
|
||||
|
||||
wchar_t s[] = L"a+b|c";
|
||||
test_type re(s, s + sizeof(s));
|
||||
test_type re(s, s + 5);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -173,7 +173,6 @@ namespace __gnu_test
|
||||
run_tests_wrapped_locale(const char* name, const func_callback& l)
|
||||
{
|
||||
using namespace std;
|
||||
bool test = true;
|
||||
|
||||
// Set the global locale.
|
||||
locale loc_name = locale(name);
|
||||
@ -202,7 +201,6 @@ namespace __gnu_test
|
||||
const func_callback& l)
|
||||
{
|
||||
using namespace std;
|
||||
bool test = true;
|
||||
|
||||
#ifdef _GLIBCXX_HAVE_SETENV
|
||||
// Set the global locale.
|
||||
|
@ -72,6 +72,7 @@ namespace __gnu_test
|
||||
VERIFY(valid == false);
|
||||
val = newval;
|
||||
valid = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
rvalstruct(rvalstruct&& in)
|
||||
@ -145,6 +146,7 @@ namespace __gnu_test
|
||||
{
|
||||
val = newval;
|
||||
valid = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -154,6 +156,7 @@ namespace __gnu_test
|
||||
++copycount;
|
||||
val = in.val;
|
||||
valid = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
copycounter&
|
||||
|
Loading…
Reference in New Issue
Block a user