Commit 567d4027 by Paolo Carlini Committed by Paolo Carlini

order_statistics_imp.hpp: Avoid -Wall warnings.

2010-06-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp:
	Avoid -Wall warnings.
	* testsuite/27_io/ios_base/failure/what-3.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/str/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/str/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sputbackc/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/seekoff/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekoff/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_stringbuf/sgetc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sgetc/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Likewise.
	* testsuite/27_io/types/2.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/peek/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/ws/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_istream/ws/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/seekg/wchar_t/8348-2.cc: Likewise.
	* testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/wchar_t/8348.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/
	wchar_t/01.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
	01.cc: Likewise.
	* testsuite/27_io/fpos/mbstate_t/4_neg.cc: Likewise.
	* testsuite/27_io/fpos/mbstate_t/2.cc: Likewise.
	* testsuite/27_io/fpos/mbstate_t/3.cc: Likewise.
	* testsuite/27_io/fpos/mbstate_t/5.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/
	4.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/
	4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/12790-4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc: Likewise.
	* testsuite/25_algorithms/minmax/3.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-3.cc: Likewise.
	* testsuite/24_iterators/front_insert_iterator/2.cc: Likewise.
	* testsuite/24_iterators/back_insert_iterator/2.cc: Likewise.
	* testsuite/24_iterators/insert_iterator/2.cc: Likewise.
	* testsuite/18_support/exception_ptr/make_exception_ptr.cc: Likewise.
	* testsuite/21_strings/c_strings/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/c_strings/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/c_strings/char/1.cc: Likewise.
	* testsuite/21_strings/c_strings/char/2.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	copy.cc: Likewise.
	* testsuite/26_numerics/random/subtract_with_carry_engine/
	cons/copy.cc: Likewise.
	* testsuite/26_numerics/random/subtract_with_carry_engine/
	requirements/constants.cc: Likewise.
	* testsuite/26_numerics/random/discard_block_engine/
	cons/copy.cc: Likewise.
	* testsuite/26_numerics/random/mersenne_twister_engine/
	cons/copy.cc: Likewise.
	* testsuite/26_numerics/random/mersenne_twister_engine/
	requirements/constants.cc: Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/
	cons/copy.cc: Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/
	requirements/constants.cc: Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/
	cons/copy.cc: Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/
	requirements/constants.cc: Likewise.
	* testsuite/26_numerics/complex/complex_value.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/overloads.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++.cc: Likewise.
	* testsuite/26_numerics/slice_array/array_assignment.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/12971.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/12971.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/17038.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/4.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/time_put/put/char/17038.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/char/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/char/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/char/5.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/1.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/char/1.cc: Likewise.
	* testsuite/22_locale/ctype_base/mask.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/random/
	subtract_with_carry/requirements/constants.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/random/
	subtract_with_carry_01/requirements/constants.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/random/
	discard_block/requirements/constants.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/random/
	linear_congruential/requirements/constants.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/random/
	mersenne_twister/requirements/constants.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/random/
	xor_combine/requirements/constants.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cfenv/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cctype/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cmath/templates.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cmath/functions.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cwctype/functions.cc: Likewise.
	* testsuite/tr1/6_containers/utility/pair.cc: Likewise.
	* testsuite/29_atomics/atomic_address/cons/aggregate.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/
	increment_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/
	bitwise_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/
	decrement_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/cons/1.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/23_containers/priority_queue/members/7161.cc
	* testsuite/23_containers/set/dr130.cc: Likewise.
	* testsuite/23_containers/list/pthread5.cc: Likewise.
	* testsuite/23_containers/map/dr130.cc: Likewise.
	* testsuite/util/exception/safety.h: Likewise.
	* testsuite/util/testsuite_common_types.h: Likewise.
	* testsuite/20_util/clocks/1.cc: Likewise.

From-SVN: r160416
parent 6e9e0126
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
...@@ -50,8 +50,6 @@ find_by_order(size_type order) ...@@ -50,8 +50,6 @@ find_by_order(size_type order)
node_iterator nd_it = node_begin(); node_iterator nd_it = node_begin();
node_iterator end_nd_it = node_end();
while (true) while (true)
{ {
if (order > nd_it.get_metadata()) if (order > nd_it.get_metadata())
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <exception> #include <exception>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
bool test01() void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// Copyright (C) 2007, 2009 // Copyright (C) 2007, 2009, 2010
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -32,6 +32,9 @@ void allocate_on_stack(void) ...@@ -32,6 +32,9 @@ void allocate_on_stack(void)
__extension__ char array[num]; __extension__ char array[num];
for (size_t i = 0; i < num; i++) for (size_t i = 0; i < num; i++)
array[i]=0; array[i]=0;
// Suppress unused warnings.
for (size_t i = 0; i < num; i++)
array[i]=array[i];
} }
void test04() void test04()
......
// 2001-02-26 Benjamin Kosnik <bkoz@redhat.com> // 2001-02-26 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -34,6 +34,9 @@ void allocate_on_stack(void) ...@@ -34,6 +34,9 @@ void allocate_on_stack(void)
__extension__ char array[num]; __extension__ char array[num];
for (size_t i = 0; i < num; i++) for (size_t i = 0; i < num; i++)
array[i]=0; array[i]=0;
// Suppress unused warnings.
for (size_t i = 0; i < num; i++)
array[i]=array[i];
} }
void test04() void test04()
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// Copyright (C) 2007, 2009 // Copyright (C) 2007, 2009, 2010
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -32,6 +32,9 @@ void allocate_on_stack(void) ...@@ -32,6 +32,9 @@ void allocate_on_stack(void)
__extension__ char array[num]; __extension__ char array[num];
for (size_t i = 0; i < num; i++) for (size_t i = 0; i < num; i++)
array[i]=0; array[i]=0;
// Suppress unused warnings.
for (size_t i = 0; i < num; i++)
array[i]=array[i];
} }
void test04() void test04()
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" } // { dg-require-cstdint "" }
// Copyright (C) 2008, 2009 Free Software Foundation // Copyright (C) 2008, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -33,6 +33,7 @@ main() ...@@ -33,6 +33,7 @@ main()
is_monotonic = is_monotonic; // suppress unused warning is_monotonic = is_monotonic; // suppress unused warning
std::time_t t2 = system_clock::to_time_t(t1); std::time_t t2 = system_clock::to_time_t(t1);
system_clock::time_point t3 = system_clock::from_time_t(t2); system_clock::time_point t3 = system_clock::from_time_t(t2);
t3 = t3; // suppress unused warning
return 0; return 0;
} }
// 2001-04-02 Benjamin Kosnik <bkoz@redhat.com> // 2001-04-02 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -60,6 +60,9 @@ void test01() ...@@ -60,6 +60,9 @@ void test01()
// void* memchr( void* s, int c, size_t n); // void* memchr( void* s, int c, size_t n);
cv = std::memchr(cv, 'a', 3); cv = std::memchr(cv, 'a', 3);
v = std::memchr(v, 'a', 3); v = std::memchr(v, 'a', 3);
cc1 = cc1; // Suppress unused warnings.
c1 = c1;
} }
int main() int main()
......
// 2001-04-02 Benjamin Kosnik <bkoz@redhat.com> // 2001-04-02 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -40,6 +40,10 @@ void test02() ...@@ -40,6 +40,10 @@ void test02()
cc = strrchr(ccarray1, 'c'); cc = strrchr(ccarray1, 'c');
cc = strpbrk(ccarray1, ccarray2); cc = strpbrk(ccarray1, ccarray2);
c = strstr(carray, carray); c = strstr(carray, carray);
cv1 = cv1; // Suppress unused warnings.
cc = cc;
c = c;
} }
int main() int main()
......
// 2001-04-02 Benjamin Kosnik <bkoz@redhat.com> // 2001-04-02 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -59,6 +59,9 @@ void test01() ...@@ -59,6 +59,9 @@ void test01()
// wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n); // wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
cc1 = std::wmemchr(ccarray1, L'a', 3); cc1 = std::wmemchr(ccarray1, L'a', 3);
c1 = std::wmemchr(carray, L'a', 3); c1 = std::wmemchr(carray, L'a', 3);
cc1 = cc1; // Suppress unused warnings.
c1 = c1;
} }
int main() int main()
......
// 2001-04-02 Benjamin Kosnik <bkoz@redhat.com> // 2001-04-02 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -39,6 +39,9 @@ void test02() ...@@ -39,6 +39,9 @@ void test02()
cw = wcspbrk(ccarray1, ccarray2); cw = wcspbrk(ccarray1, ccarray2);
cw = wcsrchr(ccarray1, L'c'); cw = wcsrchr(ccarray1, L'c');
w = wcsstr(carray, carray); w = wcsstr(carray, carray);
cw = cw; // Suppress unused warnings.
w = w;
} }
int main() int main()
......
// { dg-do compile } // { dg-do compile }
// 1999-08-24 bkoz // 1999-08-24 bkoz
// Copyright (C) 1999, 2000, 2003, 2009 Free Software Foundation // Copyright (C) 1999, 2000, 2003, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -43,6 +43,8 @@ test01() ...@@ -43,6 +43,8 @@ test01()
res = m01 | m02; res = m01 | m02;
res = m01 ^ m02; res = m01 ^ m02;
res = ~m01; res = ~m01;
res = res; // Suppress unused warning.
m01 &= m02; m01 &= m02;
m01 |= m02; m01 |= m02;
m01 ^= m02; m01 ^= m02;
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -52,12 +53,12 @@ void test01() ...@@ -52,12 +53,12 @@ void test01()
oss.imbue(loc_de); oss.imbue(loc_de);
const money_put<char>& mon_put = use_facet<money_put<char> >(oss.getloc()); const money_put<char>& mon_put = use_facet<money_put<char> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1); mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
string result1 = oss.str(); string result1 = oss.str();
VERIFY( result1 == "7.200.000.000,00 "); VERIFY( result1 == "7.200.000.000,00 ");
oss.str(empty); oss.str(empty);
iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1); mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result2 = oss.str(); string result2 = oss.str();
VERIFY( result2 == "7.200.000.000,00 "); VERIFY( result2 == "7.200.000.000,00 ");
...@@ -68,12 +69,12 @@ void test01() ...@@ -68,12 +69,12 @@ void test01()
oss.setf(ios_base::showbase); oss.setf(ios_base::showbase);
oss.str(empty); oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1); mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
string result3 = oss.str(); string result3 = oss.str();
VERIFY( result3 == "7.200.000.000,00 EUR "); VERIFY( result3 == "7.200.000.000,00 EUR ");
oss.str(empty); oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1); mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result4 = oss.str(); string result4 = oss.str();
VERIFY( result4 == "7.200.000.000,00 \244"); VERIFY( result4 == "7.200.000.000,00 \244");
...@@ -88,14 +89,14 @@ void test01() ...@@ -88,14 +89,14 @@ void test01()
// test various fill strategies // test various fill strategies
oss.str(empty); oss.str(empty);
oss.width(20); oss.width(20);
iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2); mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
string result10 = oss.str(); string result10 = oss.str();
VERIFY( result10 == "***************-,01*"); VERIFY( result10 == "***************-,01*");
oss.str(empty); oss.str(empty);
oss.width(20); oss.width(20);
oss.setf(ios_base::internal); oss.setf(ios_base::internal);
iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2); mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
string result11 = oss.str(); string result11 = oss.str();
VERIFY( result11 == "-,01****************"); VERIFY( result11 == "-,01****************");
} }
......
// 2003-11-09 Paolo Carlini <pcarlini@suse.de> // 2003-11-09 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2003, 2009 Free Software Foundation // Copyright (C) 2003, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -37,7 +37,7 @@ void test01() ...@@ -37,7 +37,7 @@ void test01()
ostringstream oss; ostringstream oss;
const money_put<char>& mon_put = use_facet<money_put<char> >(oss.getloc()); const money_put<char>& mon_put = use_facet<money_put<char> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, ' ', amount); mon_put.put(oss.rdbuf(), true, oss, ' ', amount);
string result = oss.str(); string result = oss.str();
VERIFY( result == "11" ); VERIFY( result == "11" );
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -63,12 +64,12 @@ void test02() ...@@ -63,12 +64,12 @@ void test02()
// test sign of more than one digit, say hong kong. // test sign of more than one digit, say hong kong.
oss.str(empty); oss.str(empty);
iterator_type os_it05 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1); mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result5 = oss.str(); string result5 = oss.str();
VERIFY( result5 == "HK$7,200,000,000.00"); VERIFY( result5 == "HK$7,200,000,000.00");
oss.str(empty); oss.str(empty);
iterator_type os_it06 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits2); mon_put.put(oss.rdbuf(), true, oss, ' ', digits2);
string result6 = oss.str(); string result6 = oss.str();
VERIFY( result6 == "(HKD 100,000,000,000.00)"); VERIFY( result6 == "(HKD 100,000,000,000.00)");
...@@ -76,7 +77,7 @@ void test02() ...@@ -76,7 +77,7 @@ void test02()
oss.imbue(loc_c); oss.imbue(loc_c);
oss.str(empty); oss.str(empty);
const money_put<char>& mon_put2 = use_facet<money_put<char> >(oss.getloc()); const money_put<char>& mon_put2 = use_facet<money_put<char> >(oss.getloc());
iterator_type os_it07 = mon_put2.put(oss.rdbuf(), true, oss, ' ', digits4); mon_put2.put(oss.rdbuf(), true, oss, ' ', digits4);
string result7 = oss.str(); string result7 = oss.str();
VERIFY( result7 == "1"); VERIFY( result7 == "1");
...@@ -84,7 +85,7 @@ void test02() ...@@ -84,7 +85,7 @@ void test02()
oss.imbue(loc_hk); oss.imbue(loc_hk);
oss.str(empty); oss.str(empty);
const money_put<char>& mon_put3 = use_facet<money_put<char> >(oss.getloc()); const money_put<char>& mon_put3 = use_facet<money_put<char> >(oss.getloc());
iterator_type os_it08 = mon_put3.put(oss.rdbuf(), true, oss, ' ', digits4); mon_put3.put(oss.rdbuf(), true, oss, ' ', digits4);
string result8 = oss.str(); string result8 = oss.str();
VERIFY( result8 == "(HKD .01)"); VERIFY( result8 == "(HKD .01)");
...@@ -92,7 +93,7 @@ void test02() ...@@ -92,7 +93,7 @@ void test02()
// test bunk input // test bunk input
oss.str(empty); oss.str(empty);
iterator_type os_it09 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits3); mon_put.put(oss.rdbuf(), true, oss, ' ', digits3);
string result9 = oss.str(); string result9 = oss.str();
VERIFY( result9 == ""); VERIFY( result9 == "");
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,12 +50,12 @@ void test03() ...@@ -49,12 +50,12 @@ void test03()
oss.imbue(loc_de); oss.imbue(loc_de);
const money_put<char>& mon_put = use_facet<money_put<char> >(oss.getloc()); const money_put<char>& mon_put = use_facet<money_put<char> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1); mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
string result1 = oss.str(); string result1 = oss.str();
VERIFY( result1 == "7.200.000.000,00 "); VERIFY( result1 == "7.200.000.000,00 ");
oss.str(empty); oss.str(empty);
iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1); mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result2 = oss.str(); string result2 = oss.str();
VERIFY( result2 == "7.200.000.000,00 "); VERIFY( result2 == "7.200.000.000,00 ");
...@@ -65,12 +66,12 @@ void test03() ...@@ -65,12 +66,12 @@ void test03()
oss.setf(ios_base::showbase); oss.setf(ios_base::showbase);
oss.str(empty); oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1); mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
string result3 = oss.str(); string result3 = oss.str();
VERIFY( result3 == "7.200.000.000,00 EUR "); VERIFY( result3 == "7.200.000.000,00 EUR ");
oss.str(empty); oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1); mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result4 = oss.str(); string result4 = oss.str();
VERIFY( result4 == "7.200.000.000,00 \244"); VERIFY( result4 == "7.200.000.000,00 \244");
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -53,12 +54,12 @@ void test01() ...@@ -53,12 +54,12 @@ void test01()
const money_put<wchar_t>& mon_put = const money_put<wchar_t>& mon_put =
use_facet<money_put<wchar_t> >(oss.getloc()); use_facet<money_put<wchar_t> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1); mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result1 = oss.str(); wstring result1 = oss.str();
VERIFY( result1 == L"7.200.000.000,00 " ); VERIFY( result1 == L"7.200.000.000,00 " );
oss.str(empty); oss.str(empty);
iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1); mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result2 = oss.str(); wstring result2 = oss.str();
VERIFY( result2 == L"7.200.000.000,00 " ); VERIFY( result2 == L"7.200.000.000,00 " );
...@@ -69,12 +70,12 @@ void test01() ...@@ -69,12 +70,12 @@ void test01()
oss.setf(ios_base::showbase); oss.setf(ios_base::showbase);
oss.str(empty); oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1); mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result3 = oss.str(); wstring result3 = oss.str();
VERIFY( result3 == L"7.200.000.000,00 EUR " ); VERIFY( result3 == L"7.200.000.000,00 EUR " );
oss.str(empty); oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1); mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result4 = oss.str(); wstring result4 = oss.str();
VERIFY( result4 == L"7.200.000.000,00 \x20ac" ); VERIFY( result4 == L"7.200.000.000,00 \x20ac" );
...@@ -89,14 +90,14 @@ void test01() ...@@ -89,14 +90,14 @@ void test01()
// test various fill strategies // test various fill strategies
oss.str(empty); oss.str(empty);
oss.width(20); oss.width(20);
iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, L'*', digits2); mon_put.put(oss.rdbuf(), true, oss, L'*', digits2);
wstring result10 = oss.str(); wstring result10 = oss.str();
VERIFY( result10 == L"***************-,01*" ); VERIFY( result10 == L"***************-,01*" );
oss.str(empty); oss.str(empty);
oss.width(20); oss.width(20);
oss.setf(ios_base::internal); oss.setf(ios_base::internal);
iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, L'*', digits2); mon_put.put(oss.rdbuf(), true, oss, L'*', digits2);
wstring result11 = oss.str(); wstring result11 = oss.str();
VERIFY( result11 == L"-,01****************" ); VERIFY( result11 == L"-,01****************" );
} }
......
// 2003-11-09 Paolo Carlini <pcarlini@suse.de> // 2003-11-09 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2003, 2004, 2009 Free Software Foundation // Copyright (C) 2003, 2004, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -38,7 +38,7 @@ void test01() ...@@ -38,7 +38,7 @@ void test01()
const money_put<wchar_t>& mon_put = const money_put<wchar_t>& mon_put =
use_facet<money_put<wchar_t> >(oss.getloc()); use_facet<money_put<wchar_t> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, L' ', amount); mon_put.put(oss.rdbuf(), true, oss, L' ', amount);
wstring result = oss.str(); wstring result = oss.str();
VERIFY( result == L"11" ); VERIFY( result == L"11" );
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -64,12 +65,12 @@ void test02() ...@@ -64,12 +65,12 @@ void test02()
// test sign of more than one digit, say hong kong. // test sign of more than one digit, say hong kong.
oss.str(empty); oss.str(empty);
iterator_type os_it05 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1); mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result5 = oss.str(); wstring result5 = oss.str();
VERIFY( result5 == L"HK$7,200,000,000.00" ); VERIFY( result5 == L"HK$7,200,000,000.00" );
oss.str(empty); oss.str(empty);
iterator_type os_it06 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits2); mon_put.put(oss.rdbuf(), true, oss, L' ', digits2);
wstring result6 = oss.str(); wstring result6 = oss.str();
VERIFY( result6 == L"(HKD 100,000,000,000.00)" ); VERIFY( result6 == L"(HKD 100,000,000,000.00)" );
...@@ -78,7 +79,7 @@ void test02() ...@@ -78,7 +79,7 @@ void test02()
oss.str(empty); oss.str(empty);
const money_put<wchar_t>& mon_put2 = const money_put<wchar_t>& mon_put2 =
use_facet<money_put<wchar_t> >(oss.getloc()); use_facet<money_put<wchar_t> >(oss.getloc());
iterator_type os_it07 = mon_put2.put(oss.rdbuf(), true, oss, L' ', digits4); mon_put2.put(oss.rdbuf(), true, oss, L' ', digits4);
wstring result7 = oss.str(); wstring result7 = oss.str();
VERIFY( result7 == L"1" ); VERIFY( result7 == L"1" );
...@@ -87,7 +88,7 @@ void test02() ...@@ -87,7 +88,7 @@ void test02()
oss.str(empty); oss.str(empty);
const money_put<wchar_t>& mon_put3 = const money_put<wchar_t>& mon_put3 =
use_facet<money_put<wchar_t> >(oss.getloc()); use_facet<money_put<wchar_t> >(oss.getloc());
iterator_type os_it08 = mon_put3.put(oss.rdbuf(), true, oss, L' ', digits4); mon_put3.put(oss.rdbuf(), true, oss, L' ', digits4);
wstring result8 = oss.str(); wstring result8 = oss.str();
VERIFY( result8 == L"(HKD .01)" ); VERIFY( result8 == L"(HKD .01)" );
...@@ -95,7 +96,7 @@ void test02() ...@@ -95,7 +96,7 @@ void test02()
// test bunk input // test bunk input
oss.str(empty); oss.str(empty);
iterator_type os_it09 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits3); mon_put.put(oss.rdbuf(), true, oss, L' ', digits3);
wstring result9 = oss.str(); wstring result9 = oss.str();
VERIFY( result9 == L"" ); VERIFY( result9 == L"" );
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -50,12 +51,12 @@ void test03() ...@@ -50,12 +51,12 @@ void test03()
const money_put<wchar_t>& mon_put = const money_put<wchar_t>& mon_put =
use_facet<money_put<wchar_t> >(oss.getloc()); use_facet<money_put<wchar_t> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1); mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result1 = oss.str(); wstring result1 = oss.str();
VERIFY( result1 == L"7.200.000.000,00 " ); VERIFY( result1 == L"7.200.000.000,00 " );
oss.str(empty); oss.str(empty);
iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1); mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result2 = oss.str(); wstring result2 = oss.str();
VERIFY( result2 == L"7.200.000.000,00 " ); VERIFY( result2 == L"7.200.000.000,00 " );
...@@ -66,12 +67,12 @@ void test03() ...@@ -66,12 +67,12 @@ void test03()
oss.setf(ios_base::showbase); oss.setf(ios_base::showbase);
oss.str(empty); oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1); mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result3 = oss.str(); wstring result3 = oss.str();
VERIFY( result3 == L"7.200.000.000,00 EUR " ); VERIFY( result3 == L"7.200.000.000,00 EUR " );
oss.str(empty); oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1); mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result4 = oss.str(); wstring result4 = oss.str();
VERIFY( result4 == L"7.200.000.000,00 \x20ac" ); VERIFY( result4 == L"7.200.000.000,00 \x20ac" );
......
// 2001-08-23 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-23 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -59,6 +59,8 @@ void test01() ...@@ -59,6 +59,8 @@ void test01()
pattern neg1 = monp_c_t.neg_format(); pattern neg1 = monp_c_t.neg_format();
pattern pos2 = monp_c_f.pos_format(); pattern pos2 = monp_c_f.pos_format();
pattern neg2 = monp_c_f.neg_format(); pattern neg2 = monp_c_f.neg_format();
neg1 = neg1;
neg2 = neg2;
VERIFY( q1 == '.' ); VERIFY( q1 == '.' );
VERIFY( q3 == '.' ); VERIFY( q3 == '.' );
......
// 2001-08-23 Benjamin Kosnik <bkoz@redhat.com> // 2001-08-23 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -59,6 +59,8 @@ void test01() ...@@ -59,6 +59,8 @@ void test01()
pattern neg1 = monp_c_t.neg_format(); pattern neg1 = monp_c_t.neg_format();
pattern pos2 = monp_c_f.pos_format(); pattern pos2 = monp_c_f.pos_format();
pattern neg2 = monp_c_f.neg_format(); pattern neg2 = monp_c_f.neg_format();
neg1 = neg1;
neg2 = neg2;
VERIFY( q1 == L'.' ); VERIFY( q1 == L'.' );
VERIFY( q3 == L'.' ); VERIFY( q3 == L'.' );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -63,7 +63,7 @@ void test01() ...@@ -63,7 +63,7 @@ void test01()
// bool, simple // bool, simple
iss.str("1"); iss.str("1");
iterator_type os_it00 = iss.rdbuf(); iterator_type os_it00 = iss.rdbuf();
iterator_type os_it01 = ng.get(os_it00, 0, iss, err, b1); ng.get(os_it00, 0, iss, err, b1);
VERIFY( b1 == true ); VERIFY( b1 == true );
VERIFY( err & ios_base::eofbit ); VERIFY( err & ios_base::eofbit );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -63,7 +63,7 @@ void test01() ...@@ -63,7 +63,7 @@ void test01()
// bool, simple // bool, simple
iss.str(L"1"); iss.str(L"1");
iterator_type os_it00 = iss.rdbuf(); iterator_type os_it00 = iss.rdbuf();
iterator_type os_it01 = ng.get(os_it00, 0, iss, err, b1); ng.get(os_it00, 0, iss, err, b1);
VERIFY( b1 == true ); VERIFY( b1 == true );
VERIFY( err & ios_base::eofbit ); VERIFY( err & ios_base::eofbit );
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com> // 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -61,7 +62,7 @@ void test01() ...@@ -61,7 +62,7 @@ void test01()
// bool, simple // bool, simple
iterator_type os_it00 = oss.rdbuf(); iterator_type os_it00 = oss.rdbuf();
iterator_type os_it01 = np.put(os_it00, oss, '+', b1); np.put(os_it00, oss, '+', b1);
result1 = oss.str(); result1 = oss.str();
VERIFY( result1 == "1" ); VERIFY( result1 == "1" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com> // 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -62,7 +62,7 @@ void test01() ...@@ -62,7 +62,7 @@ void test01()
// bool, simple // bool, simple
iterator_type os_it00 = oss.rdbuf(); iterator_type os_it00 = oss.rdbuf();
iterator_type os_it01 = np.put(os_it00, oss, L'+', b1); np.put(os_it00, oss, L'+', b1);
result1 = oss.str(); result1 = oss.str();
VERIFY( result1 == L"1" ); VERIFY( result1 == L"1" );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -48,7 +48,7 @@ void test01() ...@@ -48,7 +48,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const string str0 = "1"; const string str0 = "1";
iter_type end0 = tg.get_date(str0.begin(), str0.end(), iss, err, &tm0); tg.get_date(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_year == 0 ); VERIFY( tm0.tm_year == 0 );
VERIFY( tm0.tm_mon == 0 ); VERIFY( tm0.tm_mon == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -48,7 +48,7 @@ void test01() ...@@ -48,7 +48,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const wstring str0 = L"1"; const wstring str0 = L"1";
iter_type end0 = tg.get_date(str0.begin(), str0.end(), iss, err, &tm0); tg.get_date(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_year == 0 ); VERIFY( tm0.tm_year == 0 );
VERIFY( tm0.tm_mon == 0 ); VERIFY( tm0.tm_mon == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -48,7 +48,7 @@ void test01() ...@@ -48,7 +48,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const string str0 = "S"; const string str0 = "S";
iter_type end0 = tg.get_monthname(str0.begin(), str0.end(), iss, err, &tm0); tg.get_monthname(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_mon == 0 ); VERIFY( tm0.tm_mon == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -48,7 +48,7 @@ void test01() ...@@ -48,7 +48,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const wstring str0 = L"S"; const wstring str0 = L"S";
iter_type end0 = tg.get_monthname(str0.begin(), str0.end(), iss, err, &tm0); tg.get_monthname(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_mon == 0 ); VERIFY( tm0.tm_mon == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ void test01() ...@@ -49,7 +49,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const string str0 = "1"; const string str0 = "1";
iter_type end0 = tg.get_time(str0.begin(), str0.end(), iss, err, &tm0); tg.get_time(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_sec == 0 ); VERIFY( tm0.tm_sec == 0 );
VERIFY( tm0.tm_min == 0 ); VERIFY( tm0.tm_min == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ void test01() ...@@ -49,7 +49,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const wstring str0 = L"1"; const wstring str0 = L"1";
iter_type end0 = tg.get_time(str0.begin(), str0.end(), iss, err, &tm0); tg.get_time(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_sec == 0 ); VERIFY( tm0.tm_sec == 0 );
VERIFY( tm0.tm_min == 0 ); VERIFY( tm0.tm_min == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ void test01() ...@@ -49,7 +49,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const string str0 = "T"; const string str0 = "T";
iter_type end0 = tg.get_weekday(str0.begin(), str0.end(), iss, err, &tm0); tg.get_weekday(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm1.tm_wday == 0 ); VERIFY( tm1.tm_wday == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ void test01() ...@@ -49,7 +49,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const wstring str0 = L"T"; const wstring str0 = L"T";
iter_type end0 = tg.get_weekday(str0.begin(), str0.end(), iss, err, &tm0); tg.get_weekday(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm1.tm_wday == 0 ); VERIFY( tm1.tm_wday == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ void test01() ...@@ -49,7 +49,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const string str0 = "1"; const string str0 = "1";
iter_type end0 = tg.get_year(str0.begin(), str0.end(), iss, err, &tm0); tg.get_year(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_year == 0 ); VERIFY( tm0.tm_year == 0 );
......
// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // 2006-06-16 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2006, 2009 Free Software Foundation // Copyright (C) 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ void test01() ...@@ -49,7 +49,7 @@ void test01()
const time_get_type& tg = use_facet<time_get_type>(iss.getloc()); const time_get_type& tg = use_facet<time_get_type>(iss.getloc());
const wstring str0 = L"1"; const wstring str0 = L"1";
iter_type end0 = tg.get_year(str0.begin(), str0.end(), iss, err, &tm0); tg.get_year(str0.begin(), str0.end(), iss, err, &tm0);
VERIFY( err == (failbit | eofbit) ); VERIFY( err == (failbit | eofbit) );
VERIFY( tm0.tm_year == 0 ); VERIFY( tm0.tm_year == 0 );
......
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -48,27 +48,27 @@ void test01() ...@@ -48,27 +48,27 @@ void test01()
// put(iter_type s, ios_base& str, char_type fill, const tm* t, // put(iter_type s, ios_base& str, char_type fill, const tm* t,
// char format, char modifier = 0) const; // char format, char modifier = 0) const;
oss.str(empty); oss.str(empty);
iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result1 = oss.str(); string result1 = oss.str();
VERIFY( result1 == "Sun" ); VERIFY( result1 == "Sun" );
oss.str(empty); oss.str(empty);
iterator_type os_it21 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
string result21 = oss.str(); // "04/04/71" string result21 = oss.str(); // "04/04/71"
VERIFY( result21 == "04/04/71" ); VERIFY( result21 == "04/04/71" );
oss.str(empty); oss.str(empty);
iterator_type os_it22 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
string result22 = oss.str(); // "12:00:00" string result22 = oss.str(); // "12:00:00"
VERIFY( result22 == "12:00:00" ); VERIFY( result22 == "12:00:00" );
oss.str(empty); oss.str(empty);
iterator_type os_it31 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
string result31 = oss.str(); // "04/04/71" string result31 = oss.str(); // "04/04/71"
VERIFY( result31 == "04/04/71" ); VERIFY( result31 == "04/04/71" );
oss.str(empty); oss.str(empty);
iterator_type os_it32 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
string result32 = oss.str(); // "12:00:00" string result32 = oss.str(); // "12:00:00"
VERIFY( result32 == "12:00:00" ); VERIFY( result32 == "12:00:00" );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2004-08-25 Paolo Carlini <pcarlini@suse.de> // 2004-08-25 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation // Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -47,7 +47,7 @@ void test01() ...@@ -47,7 +47,7 @@ void test01()
const time_put<char>& tim_put = const time_put<char>& tim_put =
use_facet<time_put<char> >(oss.getloc()); use_facet<time_put<char> >(oss.getloc());
iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'c'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'c');
string result1 = oss.str(); string result1 = oss.str();
char time_buffer[128]; char time_buffer[128];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -47,27 +47,27 @@ void test02() ...@@ -47,27 +47,27 @@ void test02()
oss.imbue(loc_de); oss.imbue(loc_de);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it02 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result2 = oss.str(); string result2 = oss.str();
VERIFY( result2 == "Son" || result2 == "So" ); VERIFY( result2 == "Son" || result2 == "So" );
oss.str(empty); // "%d.%m.%Y" oss.str(empty); // "%d.%m.%Y"
iterator_type os_it23 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
string result23 = oss.str(); // "04.04.1971" string result23 = oss.str(); // "04.04.1971"
VERIFY( result23 == "04.04.1971" ); VERIFY( result23 == "04.04.1971" );
oss.str(empty); // "%T" oss.str(empty); // "%T"
iterator_type os_it24 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
string result24 = oss.str(); // "12:00:00" string result24 = oss.str(); // "12:00:00"
VERIFY( result24 == "12:00:00" ); VERIFY( result24 == "12:00:00" );
oss.str(empty); oss.str(empty);
iterator_type os_it33 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
string result33 = oss.str(); // "04.04.1971" string result33 = oss.str(); // "04.04.1971"
VERIFY( result33 == "04.04.1971" ); VERIFY( result33 == "04.04.1971" );
oss.str(empty); oss.str(empty);
iterator_type os_it34 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
string result34 = oss.str(); // "12:00:00" string result34 = oss.str(); // "12:00:00"
VERIFY( result34 == "12:00:00" ); VERIFY( result34 == "12:00:00" );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -47,27 +47,27 @@ void test03() ...@@ -47,27 +47,27 @@ void test03()
oss.imbue(loc_hk); oss.imbue(loc_hk);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result3 = oss.str(); string result3 = oss.str();
VERIFY( result3 == "Sun" ); VERIFY( result3 == "Sun" );
oss.str(empty); // "%A, %B %d, %Y" oss.str(empty); // "%A, %B %d, %Y"
iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
string result25 = oss.str(); // "Sunday, April 04, 1971" string result25 = oss.str(); // "Sunday, April 04, 1971"
VERIFY( result25 == "Sunday, April 04, 1971" ); VERIFY( result25 == "Sunday, April 04, 1971" );
oss.str(empty); // "%I:%M:%S %Z" oss.str(empty); // "%I:%M:%S %Z"
iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
string result26 = oss.str(); // "12:00:00 CET" or whatever timezone string result26 = oss.str(); // "12:00:00 CET" or whatever timezone
VERIFY( result26.find("12:00:00") != string::npos ); VERIFY( result26.find("12:00:00") != string::npos );
oss.str(empty); oss.str(empty);
iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
string result35 = oss.str(); // "Sunday, April 04, 1971" string result35 = oss.str(); // "Sunday, April 04, 1971"
VERIFY( result35 == "Sunday, April 04, 1971" ); VERIFY( result35 == "Sunday, April 04, 1971" );
oss.str(empty); oss.str(empty);
iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
string result36 = oss.str(); // "12:00:00 CET" string result36 = oss.str(); // "12:00:00 CET"
VERIFY( result36.find("12:00:00") != string::npos ); VERIFY( result36.find("12:00:00") != string::npos );
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
// 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -46,27 +47,27 @@ void test04() ...@@ -46,27 +47,27 @@ void test04()
ostringstream oss; ostringstream oss;
oss.imbue(loc_es); oss.imbue(loc_es);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result4 = oss.str(); string result4 = oss.str();
VERIFY( result4 == "dom" ); VERIFY( result4 == "dom" );
oss.str(empty); // "%d/%m/%y" oss.str(empty); // "%d/%m/%y"
iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
string result27 = oss.str(); // "04/04/71" string result27 = oss.str(); // "04/04/71"
VERIFY( result27 == "04/04/71" ); VERIFY( result27 == "04/04/71" );
oss.str(empty); // "%T" oss.str(empty); // "%T"
iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
string result28 = oss.str(); // "12:00:00" string result28 = oss.str(); // "12:00:00"
VERIFY( result28 == "12:00:00" ); VERIFY( result28 == "12:00:00" );
oss.str(empty); oss.str(empty);
iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
string result37 = oss.str(); // "04/04/71" string result37 = oss.str(); // "04/04/71"
VERIFY( result37 == "04/04/71" ); VERIFY( result37 == "04/04/71" );
oss.str(empty); oss.str(empty);
iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
string result38 = oss.str(); // "12:00:00" string result38 = oss.str(); // "12:00:00"
VERIFY( result38 == "12:00:00" ); VERIFY( result38 == "12:00:00" );
} }
......
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -48,13 +48,12 @@ void test05() ...@@ -48,13 +48,12 @@ void test05()
// 2 // 2
oss.str(empty); oss.str(empty);
iterator_type os_it05 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
string result5 = oss.str(); string result5 = oss.str();
VERIFY( result5 == "Sunday, the second of April"); VERIFY( result5 == "Sunday, the second of April");
iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date_ex, date_ex, date_ex + traits::length(date_ex));
date_ex + traits::length(date_ex));
string result6 = oss.str(); string result6 = oss.str();
VERIFY( result6 != result5 ); VERIFY( result6 != result5 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -50,13 +50,12 @@ void test06() ...@@ -50,13 +50,12 @@ void test06()
oss.imbue(loc_de); oss.imbue(loc_de);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it07 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
string result7 = oss.str(); string result7 = oss.str();
VERIFY( result7 == "Sonntag, the second of April"); VERIFY( result7 == "Sonntag, the second of April");
iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date_ex, date_ex, date_ex + traits::length(date_ex));
date_ex + traits::length(date_ex));
string result8 = oss.str(); string result8 = oss.str();
VERIFY( result8 != result7 ); VERIFY( result8 != result7 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -50,13 +50,12 @@ void test07() ...@@ -50,13 +50,12 @@ void test07()
oss.imbue(loc_hk); oss.imbue(loc_hk);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it09 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
string result9 = oss.str(); string result9 = oss.str();
VERIFY( result9 == "Sunday, the second of April"); VERIFY( result9 == "Sunday, the second of April");
iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date_ex, date_ex, date_ex + traits::length(date_ex));
date_ex + traits::length(date_ex));
string result10 = oss.str(); string result10 = oss.str();
VERIFY( result10 != result9 ); VERIFY( result10 != result9 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -49,13 +49,12 @@ void test08() ...@@ -49,13 +49,12 @@ void test08()
ostringstream oss; ostringstream oss;
oss.imbue(loc_fr); oss.imbue(loc_fr);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it11 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
string result11 = oss.str(); string result11 = oss.str();
VERIFY( result11 == "dimanche, the second of avril"); VERIFY( result11 == "dimanche, the second of avril");
iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, '*', &time1, tim_put.put(oss.rdbuf(), oss, '*', &time1,
date_ex, date_ex, date_ex + traits::length(date_ex));
date_ex + traits::length(date_ex));
string result12 = oss.str(); string result12 = oss.str();
VERIFY( result12 != result11 ); VERIFY( result12 != result11 );
} }
......
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -43,34 +43,35 @@ void test01() ...@@ -43,34 +43,35 @@ void test01()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_c); oss.imbue(loc_c);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
= use_facet<time_put<wchar_t> >(oss.getloc());
// 1 // 1
// iter_type // iter_type
// put(iter_type s, ios_base& str, char_type fill, const tm* t, // put(iter_type s, ios_base& str, char_type fill, const tm* t,
// char format, char modifier = 0) const; // char format, char modifier = 0) const;
oss.str(empty); oss.str(empty);
iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result1 = oss.str(); wstring result1 = oss.str();
VERIFY( result1 == L"Sun" ); VERIFY( result1 == L"Sun" );
oss.str(empty); oss.str(empty);
iterator_type os_it21 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result21 = oss.str(); // "04/04/71" wstring result21 = oss.str(); // "04/04/71"
VERIFY( result21 == L"04/04/71" ); VERIFY( result21 == L"04/04/71" );
oss.str(empty); oss.str(empty);
iterator_type os_it22 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result22 = oss.str(); // "12:00:00" wstring result22 = oss.str(); // "12:00:00"
VERIFY( result22 == L"12:00:00" ); VERIFY( result22 == L"12:00:00" );
oss.str(empty); oss.str(empty);
iterator_type os_it31 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result31 = oss.str(); // "04/04/71" wstring result31 = oss.str(); // "04/04/71"
VERIFY( result31 == L"04/04/71" ); VERIFY( result31 == L"04/04/71" );
oss.str(empty); oss.str(empty);
iterator_type os_it32 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result32 = oss.str(); // "12:00:00" wstring result32 = oss.str(); // "12:00:00"
VERIFY( result32 == L"12:00:00" ); VERIFY( result32 == L"12:00:00" );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2004-08-25 Paolo Carlini <pcarlini@suse.de> // 2004-08-25 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation // Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -47,7 +47,7 @@ void test01() ...@@ -47,7 +47,7 @@ void test01()
const time_put<wchar_t>& tim_put = const time_put<wchar_t>& tim_put =
use_facet<time_put<wchar_t> >(oss.getloc()); use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'c'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'c');
wstring result1 = oss.str(); wstring result1 = oss.str();
wchar_t time_buffer[128]; wchar_t time_buffer[128];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -45,29 +45,30 @@ void test02() ...@@ -45,29 +45,30 @@ void test02()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_de); oss.imbue(loc_de);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
= use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it02 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result2 = oss.str(); wstring result2 = oss.str();
VERIFY( result2 == L"Son" || result2 == L"So" ); VERIFY( result2 == L"Son" || result2 == L"So" );
oss.str(empty); // "%d.%m.%Y" oss.str(empty); // "%d.%m.%Y"
iterator_type os_it23 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result23 = oss.str(); // "04.04.1971" wstring result23 = oss.str(); // "04.04.1971"
VERIFY( result23 == L"04.04.1971" ); VERIFY( result23 == L"04.04.1971" );
oss.str(empty); // "%T" oss.str(empty); // "%T"
iterator_type os_it24 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result24 = oss.str(); // "12:00:00" wstring result24 = oss.str(); // "12:00:00"
VERIFY( result24 == L"12:00:00" ); VERIFY( result24 == L"12:00:00" );
oss.str(empty); oss.str(empty);
iterator_type os_it33 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result33 = oss.str(); // "04.04.1971" wstring result33 = oss.str(); // "04.04.1971"
VERIFY( result33 == L"04.04.1971" ); VERIFY( result33 == L"04.04.1971" );
oss.str(empty); oss.str(empty);
iterator_type os_it34 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result34 = oss.str(); // "12:00:00" wstring result34 = oss.str(); // "12:00:00"
VERIFY( result34 == L"12:00:00" ); VERIFY( result34 == L"12:00:00" );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -45,32 +45,32 @@ void test03() ...@@ -45,32 +45,32 @@ void test03()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_hk); oss.imbue(loc_hk);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
= use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result3 = oss.str(); wstring result3 = oss.str();
VERIFY( result3 == L"Sun" ); VERIFY( result3 == L"Sun" );
oss.str(empty); // "%A, %B %d, %Y" oss.str(empty); // "%A, %B %d, %Y"
iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result25 = oss.str(); // "Sunday, April 04, 1971" wstring result25 = oss.str(); // "Sunday, April 04, 1971"
VERIFY( result25 == L"Sunday, April 04, 1971" ); VERIFY( result25 == L"Sunday, April 04, 1971" );
oss.str(empty); // "%I:%M:%S %Z" oss.str(empty); // "%I:%M:%S %Z"
iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result26 = oss.str(); // "12:00:00 CET" or whatever timezone wstring result26 = oss.str(); // "12:00:00 CET" or whatever timezone
VERIFY( result26.find(L"12:00:00") != wstring::npos ); VERIFY( result26.find(L"12:00:00") != wstring::npos );
oss.str(empty); oss.str(empty);
iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result35 = oss.str(); // "Sunday, April 04, 1971" wstring result35 = oss.str(); // "Sunday, April 04, 1971"
VERIFY( result35 == L"Sunday, April 04, 1971" ); VERIFY( result35 == L"Sunday, April 04, 1971" );
oss.str(empty); oss.str(empty);
iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result36 = oss.str(); // "12:00:00 CET" wstring result36 = oss.str(); // "12:00:00 CET"
VERIFY( result36.find(L"12:00:00") != wstring::npos ); VERIFY( result36.find(L"12:00:00") != wstring::npos );
} }
int main() int main()
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
// 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -45,28 +46,30 @@ void test04() ...@@ -45,28 +46,30 @@ void test04()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_es); oss.imbue(loc_es);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a'); = use_facet<time_put<wchar_t> >(oss.getloc());
tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result4 = oss.str(); wstring result4 = oss.str();
VERIFY( result4 == L"dom" ); VERIFY( result4 == L"dom" );
oss.str(empty); // "%d/%m/%y" oss.str(empty); // "%d/%m/%y"
iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result27 = oss.str(); // "04/04/71" wstring result27 = oss.str(); // "04/04/71"
VERIFY( result27 == L"04/04/71" ); VERIFY( result27 == L"04/04/71" );
oss.str(empty); // "%T" oss.str(empty); // "%T"
iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result28 = oss.str(); // "12:00:00" wstring result28 = oss.str(); // "12:00:00"
VERIFY( result28 == L"12:00:00" ); VERIFY( result28 == L"12:00:00" );
oss.str(empty); oss.str(empty);
iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result37 = oss.str(); // "04/04/71" wstring result37 = oss.str(); // "04/04/71"
VERIFY( result37 == L"04/04/71" ); VERIFY( result37 == L"04/04/71" );
oss.str(empty); oss.str(empty);
iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E'); tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result38 = oss.str(); // "12:00:00" wstring result38 = oss.str(); // "12:00:00"
VERIFY( result38 == L"12:00:00" ); VERIFY( result38 == L"12:00:00" );
} }
......
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -46,17 +46,17 @@ void test05() ...@@ -46,17 +46,17 @@ void test05()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_c); oss.imbue(loc_c);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
= use_facet<time_put<wchar_t> >(oss.getloc());
// 2 // 2
oss.str(empty); oss.str(empty);
iterator_type os_it05 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
wstring result5 = oss.str(); wstring result5 = oss.str();
VERIFY( result5 == L"Sunday, the second of April"); VERIFY( result5 == L"Sunday, the second of April");
iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex, date_ex + traits::length(date_ex));
date_ex + traits::length(date_ex));
wstring result6 = oss.str(); wstring result6 = oss.str();
VERIFY( result6 != result5 ); VERIFY( result6 != result5 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -48,14 +48,15 @@ void test06() ...@@ -48,14 +48,15 @@ void test06()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_de); oss.imbue(loc_de);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
= use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it07 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
wstring result7 = oss.str(); wstring result7 = oss.str();
VERIFY( result7 == L"Sonntag, the second of April"); VERIFY( result7 == L"Sonntag, the second of April");
iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date)); date_ex, date_ex + traits::length(date));
wstring result8 = oss.str(); wstring result8 = oss.str();
VERIFY( result8 != result7 ); VERIFY( result8 != result7 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -48,14 +48,15 @@ void test07() ...@@ -48,14 +48,15 @@ void test07()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_hk); oss.imbue(loc_hk);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
= use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it09 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date)); date, date + traits::length(date));
wstring result9 = oss.str(); wstring result9 = oss.str();
VERIFY( result9 == L"Sunday, the second of April"); VERIFY( result9 == L"Sunday, the second of April");
iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date)); date_ex, date_ex + traits::length(date));
wstring result10 = oss.str(); wstring result10 = oss.str();
VERIFY( result10 != result9 ); VERIFY( result10 != result9 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -48,13 +48,15 @@ void test08() ...@@ -48,13 +48,15 @@ void test08()
const wstring empty; const wstring empty;
wostringstream oss; wostringstream oss;
oss.imbue(loc_fr); oss.imbue(loc_fr);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc()); const time_put<wchar_t>& tim_put
iterator_type os_it11 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, = use_facet<time_put<wchar_t> >(oss.getloc());
date, date + traits::length(date));
tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date));
wstring result11 = oss.str(); wstring result11 = oss.str();
VERIFY( result11 == L"dimanche, the second of avril"); VERIFY( result11 == L"dimanche, the second of avril");
iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date)); date_ex, date_ex + traits::length(date));
wstring result12 = oss.str(); wstring result12 = oss.str();
VERIFY( result12 != result11 ); VERIFY( result12 != result11 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Adpated from libstdc++/5464 submitted by jjessel@amadeus.net // Adpated from libstdc++/5464 submitted by jjessel@amadeus.net
// Jean-Francois JESSEL (Amadeus SAS Development) // Jean-Francois JESSEL (Amadeus SAS Development)
// //
// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 // Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -99,7 +99,7 @@ main () ...@@ -99,7 +99,7 @@ main ()
#endif #endif
pthread_attr_t tattr; pthread_attr_t tattr;
int ret = pthread_attr_init (&tattr); int ret __attribute__((unused)) = pthread_attr_init (&tattr);
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
ret = pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM); ret = pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM);
#endif #endif
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// 2008-07-22 Edward Smith-Rowland <3dw4rd@verizon.net> // 2008-07-22 Edward Smith-Rowland <3dw4rd@verizon.net>
// //
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -34,7 +34,7 @@ test01() ...@@ -34,7 +34,7 @@ test01()
typedef map<int, int>::value_type value_type; typedef map<int, int>::value_type value_type;
typedef pair<iterator, bool> insert_return_type; typedef pair<iterator, bool> insert_return_type;
insert_return_type irt0 = m0.insert(value_type(1, 1)); m0.insert(value_type(1, 1));
insert_return_type irt1 = m0.insert(value_type(2, 2)); insert_return_type irt1 = m0.insert(value_type(2, 2));
insert_return_type irt2 = m0.insert(value_type(3, 3)); insert_return_type irt2 = m0.insert(value_type(3, 3));
...@@ -58,7 +58,7 @@ test02() ...@@ -58,7 +58,7 @@ test02()
typedef pair<iterator, bool> insert_return_type; typedef pair<iterator, bool> insert_return_type;
insert_return_type irt0 = m0.insert(value_type(1, 1)); insert_return_type irt0 = m0.insert(value_type(1, 1));
insert_return_type irt1 = m0.insert(value_type(2, 2)); m0.insert(value_type(2, 2));
insert_return_type irt2 = m0.insert(value_type(3, 3)); insert_return_type irt2 = m0.insert(value_type(3, 3));
insert_return_type irt3 = m0.insert(value_type(4, 4)); insert_return_type irt3 = m0.insert(value_type(4, 4));
......
// 2002-06-28 pme // 2002-06-28 pme
// Copyright (C) 2002, 2004, 2005, 2009 Free Software Foundation, Inc. // Copyright (C) 2002, 2004, 2005, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -28,12 +28,10 @@ test03() ...@@ -28,12 +28,10 @@ test03()
{ {
int data[] = {1, 2, 3}; int data[] = {1, 2, 3};
std::priority_queue<int> pq; std::priority_queue<int> pq;
std::size_t size = pq.size();
for (int i = 0; i < 3; ++i) for (int i = 0; i < 3; ++i)
pq.push(data[i]); pq.push(data[i]);
size = pq.size();
pq.top(); pq.top();
for (int i = 0; i < 2; ++i) for (int i = 0; i < 2; ++i)
pq.pop(); pq.pop();
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// 2008-07-22 Edward Smith-Rowland <3dw4rd@verizon.net> // 2008-07-22 Edward Smith-Rowland <3dw4rd@verizon.net>
// //
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -33,7 +33,7 @@ test01() ...@@ -33,7 +33,7 @@ test01()
typedef set<int>::const_iterator const_iterator; typedef set<int>::const_iterator const_iterator;
typedef pair<iterator, bool> insert_return_type; typedef pair<iterator, bool> insert_return_type;
insert_return_type irt0 = s0.insert(1); s0.insert(1);
insert_return_type irt1 = s0.insert(2); insert_return_type irt1 = s0.insert(2);
insert_return_type irt2 = s0.insert(3); insert_return_type irt2 = s0.insert(3);
...@@ -56,7 +56,7 @@ test02() ...@@ -56,7 +56,7 @@ test02()
typedef pair<iterator, bool> insert_return_type; typedef pair<iterator, bool> insert_return_type;
insert_return_type irt0 = s0.insert(1); insert_return_type irt0 = s0.insert(1);
insert_return_type irt1 = s0.insert(2); s0.insert(2);
insert_return_type irt2 = s0.insert(3); insert_return_type irt2 = s0.insert(3);
insert_return_type irt3 = s0.insert(4); insert_return_type irt3 = s0.insert(4);
......
// 2001-06-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-06-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2004, 2005, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2004, 2005, 2009, 2010
// Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -27,6 +28,7 @@ void test02() ...@@ -27,6 +28,7 @@ void test02()
typedef std::back_insert_iterator<std::list<int> > iterator_type; typedef std::back_insert_iterator<std::list<int> > iterator_type;
std::list<int> li; std::list<int> li;
iterator_type it = std::back_inserter(li); iterator_type it = std::back_inserter(li);
it = it; // Suppress unused warning.
} }
int main() int main()
......
// 2001-06-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-06-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2004, 2005, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2004, 2005, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -27,6 +27,7 @@ void test02() ...@@ -27,6 +27,7 @@ void test02()
typedef std::front_insert_iterator<std::list<int> > iterator_type; typedef std::front_insert_iterator<std::list<int> > iterator_type;
std::list<int> li; std::list<int> li;
iterator_type it = std::front_inserter(li); iterator_type it = std::front_inserter(li);
it = it; // Suppress unused warning.
} }
int main() int main()
......
// 2001-06-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-06-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2004, 2005, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2004, 2005, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -30,6 +30,8 @@ void test02() ...@@ -30,6 +30,8 @@ void test02()
std::list<int>::iterator liit = li.begin(); std::list<int>::iterator liit = li.begin();
iterator_type it01(li, liit); iterator_type it01(li, liit);
iterator_type it02 = std::inserter(li, liit); iterator_type it02 = std::inserter(li, liit);
it01 = it01; // Suppress unused warnings.
it02 = it02;
} }
int main() int main()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 2008-09-16 Chris Fairles <chris.fairles@gmail.com> // 2008-09-16 Chris Fairles <chris.fairles@gmail.com>
// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,8 +41,7 @@ void test01() ...@@ -41,8 +41,7 @@ void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
std::pair<int, int> z = std::minmax({1, 2, 3, 4, 5, 6, 7, 8}, std::minmax({1, 2, 3, 4, 5, 6, 7, 8}, compare_counter());
compare_counter());
// If N is the number of arguments in the minmax function call, // If N is the number of arguments in the minmax function call,
// 25.3.7 specifies that at most 3N/2 comparisons are allowed. // 25.3.7 specifies that at most 3N/2 comparisons are allowed.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// 2000-11-20 // 2000-11-20
// Benjamin Kosnik bkoz@redhat.com // Benjamin Kosnik bkoz@redhat.com
// Copyright (C) 2000, 2003, 2004, 2009 Free Software Foundation, Inc. // Copyright (C) 2000, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -34,27 +34,27 @@ void test01() ...@@ -34,27 +34,27 @@ void test01()
complex_type a(cd1, cd2); complex_type a(cd1, cd2);
double d; double d;
d = a.real(); d = a.real();
VERIFY( d == cd1); VERIFY( d == cd1 );
d = a.imag(); d = a.imag();
VERIFY(d == cd2); VERIFY( d == cd2 );
complex_type c(cd1, cd2); complex_type c(cd1, cd2);
double d6 = abs(c); double d6 = abs(c);
VERIFY( d6 >= 0); VERIFY( d6 >= 0 );
double d7 = arg(c); double d7 = arg(c);
double d8 = atan2(c.imag(), c.real()); double d8 = atan2(c.imag(), c.real());
VERIFY( d7 == d8); VERIFY( d7 == d8 );
double d9 = norm(c); double d9 = norm(c);
double d10 = d6 * d6; double d10 = d6 * d6;
VERIFY(d9 - d10 == 0); VERIFY( d9 - d10 == 0 );
complex_type e = conj(c); complex_type e __attribute__((unused)) = conj(c);
complex_type f = polar(c.imag(), 0.0); complex_type f = polar(c.imag(), 0.0);
VERIFY(f.real() != 0); VERIFY( f.real() != 0 );
} }
......
...@@ -70,6 +70,7 @@ template <typename _Tp> ...@@ -70,6 +70,7 @@ template <typename _Tp>
res = std::islessequal(f1,f2); res = std::islessequal(f1,f2);
res = std::islessgreater(f1, f2); res = std::islessgreater(f1, f2);
res = std::isunordered(f1, f2); res = std::isunordered(f1, f2);
res = res; // Suppress unused warning.
} }
#endif #endif
......
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -43,4 +43,5 @@ int main() ...@@ -43,4 +43,5 @@ int main()
ans = std::sinh(j); ans = std::sinh(j);
ans = std::tan(i); ans = std::tan(i);
ans = std::tanh(i); ans = std::tanh(i);
ans = ans; // Suppress unused warnings.
} }
...@@ -33,6 +33,7 @@ test01() ...@@ -33,6 +33,7 @@ test01()
const auto f(e); const auto f(e);
auto g(f); auto g(f);
g = g; // Suppress unused warning.
} }
int main() int main()
......
...@@ -34,6 +34,7 @@ test01() ...@@ -34,6 +34,7 @@ test01()
const auto f(e); const auto f(e);
auto g(f); auto g(f);
g = g; // Suppress unused warning.
} }
int main() int main()
......
...@@ -28,7 +28,8 @@ test01() ...@@ -28,7 +28,8 @@ test01()
std::linear_congruential_engine<unsigned long, 48271, 0, 2147483647> e(1); std::linear_congruential_engine<unsigned long, 48271, 0, 2147483647> e(1);
const auto f(e); const auto f(e);
auto g(f); auto g(f);
g = g; // Suppress unused warning.
} }
int main() int main()
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com> // 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
// //
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -31,6 +31,7 @@ void test01() ...@@ -31,6 +31,7 @@ void test01()
p = &lc.increment; p = &lc.increment;
p = &lc.modulus; p = &lc.modulus;
p = &lc.default_seed; p = &lc.default_seed;
p = p; // Suppress unused warning.
} }
int main() int main()
......
...@@ -36,6 +36,7 @@ test01() ...@@ -36,6 +36,7 @@ test01()
const auto f(e); const auto f(e);
auto g(f); auto g(f);
g = g; // Suppress unused warning.
} }
int main() int main()
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com> // 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
// //
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,6 +41,7 @@ void test01() ...@@ -41,6 +41,7 @@ void test01()
p = &mt.tempering_l; p = &mt.tempering_l;
p = &mt.initialization_multiplier; p = &mt.initialization_multiplier;
p = &mt.default_seed; p = &mt.default_seed;
p = p; // Suppress unused warning.
} }
int main() int main()
......
...@@ -33,6 +33,7 @@ test01() ...@@ -33,6 +33,7 @@ test01()
const auto f(e); const auto f(e);
auto g(f); auto g(f);
g = g; // Suppress unused warning.
} }
int main() int main()
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com> // 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
// //
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -29,6 +29,7 @@ void test01() ...@@ -29,6 +29,7 @@ void test01()
const void* p = &so.table_size; const void* p = &so.table_size;
p = &so.table_size; p = &so.table_size;
p = p; // Suppress unused warning.
} }
int main() int main()
......
...@@ -29,6 +29,7 @@ test01() ...@@ -29,6 +29,7 @@ test01()
const auto f(e); const auto f(e);
auto g(f); auto g(f);
g = g; // Suppress unused warning.
} }
int main() int main()
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com> // 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
// //
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -31,6 +31,7 @@ void test01() ...@@ -31,6 +31,7 @@ void test01()
p = &swc.short_lag; p = &swc.short_lag;
p = &swc.long_lag; p = &swc.long_lag;
p = &swc.default_seed; p = &swc.default_seed;
p = p; // Suppress unused warning.
} }
int main() int main()
......
// 20010613 gdr // 20010613 gdr
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
// with this library; see the file COPYING3. If not see // with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// This is DR-253. Test for accessible assignment-operators. // This is DR-253. Test for accessible assignment-operators.
#include <valarray> #include <valarray>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
...@@ -36,7 +34,7 @@ int main() ...@@ -36,7 +34,7 @@ int main()
VERIFY(v[3] == 1 && w[3] == 1); VERIFY(v[3] == 1 && w[3] == 1);
VERIFY(v[6] == 1 && w[6] == 1); VERIFY(v[6] == 1 && w[6] == 1);
std::slice_array<int> t = v[slice(0, 10, 1)]; std::slice_array<int> t __attribute__((unused)) = v[slice(0, 10, 1)];
return 0; return 0;
} }
// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. // Copyright (C) 2003, 2005, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -47,7 +47,7 @@ void test01() ...@@ -47,7 +47,7 @@ void test01()
fb.sputc(pod_uchar::from<char>(0xff)); fb.sputc(pod_uchar::from<char>(0xff));
// Check that seekoff sets the current state during output // Check that seekoff sets the current state during output
traits_type::pos_type pos = fb.pubseekoff(0, ios_base::cur); fb.pubseekoff(0, ios_base::cur);
fb.sputc(pod_uchar::from<char>('a')); fb.sputc(pod_uchar::from<char>('a'));
fb.sputc(pod_uchar::from<char>(0xff)); fb.sputc(pod_uchar::from<char>(0xff));
fb.sputc(pod_uchar::from<char>(0)); fb.sputc(pod_uchar::from<char>(0));
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test05() ...@@ -41,7 +41,7 @@ void test05()
typedef filebuf::traits_type traits_type; typedef filebuf::traits_type traits_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1;
int_type c1; int_type c1;
int_type c2; int_type c2;
...@@ -65,7 +65,7 @@ void test05() ...@@ -65,7 +65,7 @@ void test05()
//beg //beg
strmsz_1 = fb.in_avail(); strmsz_1 = fb.in_avail();
pt_1 = fb.pubseekoff(2, ios_base::beg); pt_1 = fb.pubseekoff(2, ios_base::beg);
strmsz_2 = fb.in_avail(); fb.in_avail();
off_1 = off_type(pt_1); off_1 = off_type(pt_1);
VERIFY( off_1 > 0 ); VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1 c1 = fb.snextc(); //current in pointer +1
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test05() ...@@ -41,7 +41,7 @@ void test05()
typedef filebuf::off_type off_type; typedef filebuf::off_type off_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1;
int_type c1; int_type c1;
int_type c2; int_type c2;
...@@ -66,7 +66,7 @@ void test05() ...@@ -66,7 +66,7 @@ void test05()
//beg //beg
strmsz_1 = fb.in_avail(); strmsz_1 = fb.in_avail();
pt_1 = fb.pubseekoff(2, ios_base::beg); pt_1 = fb.pubseekoff(2, ios_base::beg);
strmsz_2 = fb.in_avail(); fb.in_avail();
off_1 = off_type(pt_1); off_1 = off_type(pt_1);
VERIFY( off_1 > 0 ); VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1 c1 = fb.snextc(); //current in pointer +1
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test05() ...@@ -41,7 +41,7 @@ void test05()
typedef filebuf::traits_type traits_type; typedef filebuf::traits_type traits_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1;
int_type c1; int_type c1;
int_type c2; int_type c2;
...@@ -66,7 +66,7 @@ void test05() ...@@ -66,7 +66,7 @@ void test05()
//beg //beg
strmsz_1 = fb.in_avail(); strmsz_1 = fb.in_avail();
pt_1 = fb.pubseekoff(2, ios_base::beg); pt_1 = fb.pubseekoff(2, ios_base::beg);
strmsz_2 = fb.in_avail(); fb.in_avail();
off_1 = off_type(pt_1); off_1 = off_type(pt_1);
VERIFY( off_1 > 0 ); VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1 c1 = fb.snextc(); //current in pointer +1
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test05() ...@@ -41,7 +41,7 @@ void test05()
typedef filebuf::traits_type traits_type; typedef filebuf::traits_type traits_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1;
int_type c1; int_type c1;
int_type c2; int_type c2;
...@@ -66,7 +66,7 @@ void test05() ...@@ -66,7 +66,7 @@ void test05()
//beg //beg
strmsz_1 = fb.in_avail(); strmsz_1 = fb.in_avail();
pt_1 = fb.pubseekoff(2, ios_base::beg); pt_1 = fb.pubseekoff(2, ios_base::beg);
strmsz_2 = fb.in_avail(); fb.in_avail();
off_1 = off_type(pt_1); off_1 = off_type(pt_1);
VERIFY( off_1 > 0 ); VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1 c1 = fb.snextc(); //current in pointer +1
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test05() ...@@ -41,7 +41,7 @@ void test05()
typedef filebuf::off_type off_type; typedef filebuf::off_type off_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1;
int_type c1; int_type c1;
int_type c2; int_type c2;
...@@ -66,7 +66,7 @@ void test05() ...@@ -66,7 +66,7 @@ void test05()
//beg //beg
strmsz_1 = fb.in_avail(); strmsz_1 = fb.in_avail();
pt_1 = fb.pubseekoff(2, ios_base::beg); pt_1 = fb.pubseekoff(2, ios_base::beg);
strmsz_2 = fb.in_avail(); fb.in_avail();
off_1 = off_type(pt_1); off_1 = off_type(pt_1);
VERIFY( off_1 > 0 ); VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1 c1 = fb.snextc(); //current in pointer +1
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test05() ...@@ -41,7 +41,7 @@ void test05()
typedef filebuf::traits_type traits_type; typedef filebuf::traits_type traits_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1;
int_type c1; int_type c1;
int_type c2; int_type c2;
...@@ -66,7 +66,7 @@ void test05() ...@@ -66,7 +66,7 @@ void test05()
//beg //beg
strmsz_1 = fb.in_avail(); strmsz_1 = fb.in_avail();
pt_1 = fb.pubseekoff(2, ios_base::beg); pt_1 = fb.pubseekoff(2, ios_base::beg);
strmsz_2 = fb.in_avail(); fb.in_avail();
off_1 = off_type(pt_1); off_1 = off_type(pt_1);
VERIFY( off_1 > 0 ); VERIFY( off_1 > 0 );
c1 = fb.snextc(); //current in pointer +1 c1 = fb.snextc(); //current in pointer +1
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -40,7 +40,7 @@ void test05() ...@@ -40,7 +40,7 @@ void test05()
streamsize strmsz_1, strmsz_2; streamsize strmsz_1, strmsz_2;
char carray2[8192] = ""; char carray2[8192] = "";
int_type c2, c4; int_type c2;
// streamsize sgetn(char_type *s, streamsize n) // streamsize sgetn(char_type *s, streamsize n)
// streamsize xsgetn(char_type *s, streamsize n) // streamsize xsgetn(char_type *s, streamsize n)
...@@ -63,7 +63,7 @@ void test05() ...@@ -63,7 +63,7 @@ void test05()
strmsz_2 = fb_02.sgetn(carray2, strmsz_1 + 5); strmsz_2 = fb_02.sgetn(carray2, strmsz_1 + 5);
VERIFY( strmsz_1 == -1 ); VERIFY( strmsz_1 == -1 );
VERIFY( strmsz_2 == 0 ); VERIFY( strmsz_2 == 0 );
c4 = fb_02.sgetc(); fb_02.sgetc();
VERIFY( fb_02.unbuffered() ); VERIFY( fb_02.unbuffered() );
VERIFY( !fb_02.read_position() ); VERIFY( !fb_02.read_position() );
} }
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test01() ...@@ -41,7 +41,7 @@ void test01()
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1, strmsz_2;
int_type c1, c2, c3; int_type c1, c2;
// int_type sungetc() // int_type sungetc()
// if in_cur not avail, return pbackfail(), else decrement and // if in_cur not avail, return pbackfail(), else decrement and
...@@ -56,7 +56,7 @@ void test01() ...@@ -56,7 +56,7 @@ void test01()
fb_01.sputc('u'); fb_01.sputc('u');
fb_01.sputc('v'); fb_01.sputc('v');
fb_01.pubseekoff(-1, std::ios_base::end); fb_01.pubseekoff(-1, std::ios_base::end);
c3 = fb_01.sbumpc(); fb_01.sbumpc();
strmsz_1 = fb_01.in_avail(); strmsz_1 = fb_01.in_avail();
c2 = fb_01.sungetc(); c2 = fb_01.sungetc();
strmsz_2 = fb_01.in_avail(); strmsz_2 = fb_01.in_avail();
...@@ -68,7 +68,7 @@ void test01() ...@@ -68,7 +68,7 @@ void test01()
c1 = fb_01.sgetc(); c1 = fb_01.sgetc();
c2 = fb_01.sungetc(); c2 = fb_01.sungetc();
strmsz_2 = fb_01.in_avail(); // 1 strmsz_2 = fb_01.in_avail(); // 1
c3 = fb_01.sgetc(); fb_01.sgetc();
VERIFY( c1 != c2 ); VERIFY( c1 != c2 );
VERIFY( strmsz_2 != strmsz_1 ); VERIFY( strmsz_2 != strmsz_1 );
VERIFY( strmsz_2 == 1 ); VERIFY( strmsz_2 == 1 );
......
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,7 @@ void test01() ...@@ -41,7 +41,7 @@ void test01()
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
streamsize strmsz_1, strmsz_2; streamsize strmsz_1, strmsz_2;
int_type c1, c2, c3; int_type c1, c2;
// int_type sungetc() // int_type sungetc()
// if in_cur not avail, return pbackfail(), else decrement and // if in_cur not avail, return pbackfail(), else decrement and
...@@ -56,7 +56,7 @@ void test01() ...@@ -56,7 +56,7 @@ void test01()
fb_01.sputc('u'); fb_01.sputc('u');
fb_01.sputc('v'); fb_01.sputc('v');
fb_01.pubseekoff(-1, std::ios_base::end); fb_01.pubseekoff(-1, std::ios_base::end);
c3 = fb_01.sbumpc(); fb_01.sbumpc();
strmsz_1 = fb_01.in_avail(); strmsz_1 = fb_01.in_avail();
c2 = fb_01.sungetc(); c2 = fb_01.sungetc();
strmsz_2 = fb_01.in_avail(); strmsz_2 = fb_01.in_avail();
...@@ -68,7 +68,7 @@ void test01() ...@@ -68,7 +68,7 @@ void test01()
c1 = fb_01.sgetc(); c1 = fb_01.sgetc();
c2 = fb_01.sungetc(); c2 = fb_01.sungetc();
strmsz_2 = fb_01.in_avail(); // 1 strmsz_2 = fb_01.in_avail(); // 1
c3 = fb_01.sgetc(); fb_01.sgetc();
VERIFY( c1 != c2 ); VERIFY( c1 != c2 );
VERIFY( strmsz_2 != strmsz_1 ); VERIFY( strmsz_2 != strmsz_1 );
VERIFY( strmsz_2 == 1 ); VERIFY( strmsz_2 == 1 );
......
...@@ -62,11 +62,8 @@ bool test01() { ...@@ -62,11 +62,8 @@ bool test01() {
long double ld1 = 0; long double ld1 = 0;
// process alphanumeric versions of bool values // process alphanumeric versions of bool values
std::ios_base::fmtflags fmt = is_02.flags();
bool testfmt = fmt & std::ios_base::boolalpha;
is_02.setf(std::ios_base::boolalpha); is_02.setf(std::ios_base::boolalpha);
fmt = is_02.flags(); is_02.flags();
testfmt = fmt & std::ios_base::boolalpha;
is_02 >> b1; is_02 >> b1;
VERIFY( b1 == 1 ); VERIFY( b1 == 1 );
is_02 >> b1; is_02 >> b1;
...@@ -74,8 +71,7 @@ bool test01() { ...@@ -74,8 +71,7 @@ bool test01() {
// process numeric versions of of bool values // process numeric versions of of bool values
is_02.unsetf(std::ios_base::boolalpha); is_02.unsetf(std::ios_base::boolalpha);
fmt = is_02.flags(); is_02.flags();
testfmt = fmt & std::ios_base::boolalpha;
is_02 >> b1; is_02 >> b1;
VERIFY( b1 == 0 ); VERIFY( b1 == 0 );
is_02 >> b1; is_02 >> b1;
......
...@@ -59,11 +59,8 @@ bool test01() { ...@@ -59,11 +59,8 @@ bool test01() {
long double ld1 = 0; long double ld1 = 0;
// process alphanumeric versions of bool values // process alphanumeric versions of bool values
std::ios_base::fmtflags fmt = is_02.flags();
bool testfmt = fmt & std::ios_base::boolalpha;
is_02.setf(std::ios_base::boolalpha); is_02.setf(std::ios_base::boolalpha);
fmt = is_02.flags(); is_02.flags();
testfmt = fmt & std::ios_base::boolalpha;
is_02 >> b1; is_02 >> b1;
VERIFY( b1 == 1 ); VERIFY( b1 == 1 );
is_02 >> b1; is_02 >> b1;
...@@ -71,8 +68,7 @@ bool test01() { ...@@ -71,8 +68,7 @@ bool test01() {
// process numeric versions of of bool values // process numeric versions of of bool values
is_02.unsetf(std::ios_base::boolalpha); is_02.unsetf(std::ios_base::boolalpha);
fmt = is_02.flags(); is_02.flags();
testfmt = fmt & std::ios_base::boolalpha;
is_02 >> b1; is_02 >> b1;
VERIFY( b1 == 0 ); VERIFY( b1 == 0 );
is_02 >> b1; is_02 >> b1;
......
...@@ -40,9 +40,7 @@ test01() ...@@ -40,9 +40,7 @@ test01()
std::istream is_00(0); std::istream is_00(0);
std::istream is_03(&isbuf_03); std::istream is_03(&isbuf_03);
std::istream is_04(&isbuf_04); std::istream is_04(&isbuf_04);
std::ios_base::iostate state1, state2, statefail, stateeof; std::ios_base::iostate state1, state2;
statefail = std::ios_base::failbit;
stateeof = std::ios_base::eofbit;
// istream& read(char_type* s, streamsize n) // istream& read(char_type* s, streamsize n)
char carray[60] = ""; char carray[60] = "";
......
...@@ -37,9 +37,7 @@ test01() ...@@ -37,9 +37,7 @@ test01()
std::wistream is_00(0); std::wistream is_00(0);
std::wistream is_03(&isbuf_03); std::wistream is_03(&isbuf_03);
std::wistream is_04(&isbuf_04); std::wistream is_04(&isbuf_04);
std::ios_base::iostate state1, state2, statefail, stateeof; std::ios_base::iostate state1, state2;
statefail = std::ios_base::failbit;
stateeof = std::ios_base::eofbit;
// istream& read(char_type* s, streamsize n) // istream& read(char_type* s, streamsize n)
wchar_t carray[60] = L""; wchar_t carray[60] = L"";
......
...@@ -40,9 +40,7 @@ test01() ...@@ -40,9 +40,7 @@ test01()
std::istream is_00(0); std::istream is_00(0);
std::istream is_03(&isbuf_03); std::istream is_03(&isbuf_03);
std::istream is_04(&isbuf_04); std::istream is_04(&isbuf_04);
std::ios_base::iostate state1, state2, statefail, stateeof; std::ios_base::iostate state1, state2;
statefail = std::ios_base::failbit;
stateeof = std::ios_base::eofbit;
char carray[60] = ""; char carray[60] = "";
......
...@@ -37,9 +37,7 @@ test01() ...@@ -37,9 +37,7 @@ test01()
std::wistream is_00(0); std::wistream is_00(0);
std::wistream is_03(&isbuf_03); std::wistream is_03(&isbuf_03);
std::wistream is_04(&isbuf_04); std::wistream is_04(&isbuf_04);
std::ios_base::iostate state1, state2, statefail, stateeof; std::ios_base::iostate state1, state2;
statefail = std::ios_base::failbit;
stateeof = std::ios_base::eofbit;
wchar_t carray[60] = L""; wchar_t carray[60] = L"";
......
// 2000-06-29 bkoz // 2000-06-29 bkoz
// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -35,7 +35,7 @@ void test06(void) ...@@ -35,7 +35,7 @@ void test06(void)
// seekg // seekg
{ {
istringstream iss(num1); istringstream iss(num1);
istream::pos_type pos1 = iss.tellg(); iss.tellg();
int asNum = 0; int asNum = 0;
iss >> asNum; iss >> asNum;
VERIFY( test = iss.eof() ); VERIFY( test = iss.eof() );
......
// Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation // Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -32,7 +32,7 @@ void test06(void) ...@@ -32,7 +32,7 @@ void test06(void)
// seekg // seekg
{ {
wistringstream iss(num1); wistringstream iss(num1);
wistream::pos_type pos1 = iss.tellg(); iss.tellg();
int asNum = 0; int asNum = 0;
iss >> asNum; iss >> asNum;
VERIFY( test = iss.eof() ); VERIFY( test = iss.eof() );
......
// 2000-06-29 bkoz // 2000-06-29 bkoz
// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
// Free Software Foundation // Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -35,7 +35,7 @@ void test06(void) ...@@ -35,7 +35,7 @@ void test06(void)
// tellg // tellg
{ {
istringstream iss(num1); istringstream iss(num1);
istream::pos_type pos1 = iss.tellg(); iss.tellg();
int asNum = 0; int asNum = 0;
iss >> asNum; iss >> asNum;
VERIFY( test = iss.eof() ); VERIFY( test = iss.eof() );
...@@ -47,7 +47,7 @@ void test06(void) ...@@ -47,7 +47,7 @@ void test06(void)
// seekg // seekg
{ {
istringstream iss(num1); istringstream iss(num1);
istream::pos_type pos1 = iss.tellg(); iss.tellg();
int asNum = 0; int asNum = 0;
iss >> asNum; iss >> asNum;
VERIFY( test = iss.eof() ); VERIFY( test = iss.eof() );
......
...@@ -32,7 +32,7 @@ void test06(void) ...@@ -32,7 +32,7 @@ void test06(void)
// tellg // tellg
{ {
wistringstream iss(num1); wistringstream iss(num1);
wistream::pos_type pos1 = iss.tellg(); iss.tellg();
int asNum = 0; int asNum = 0;
iss >> asNum; iss >> asNum;
VERIFY( test = iss.eof() ); VERIFY( test = iss.eof() );
...@@ -44,7 +44,7 @@ void test06(void) ...@@ -44,7 +44,7 @@ void test06(void)
// seekg // seekg
{ {
wistringstream iss(num1); wistringstream iss(num1);
wistream::pos_type pos1 = iss.tellg(); iss.tellg();
int asNum = 0; int asNum = 0;
iss >> asNum; iss >> asNum;
VERIFY( test = iss.eof() ); VERIFY( test = iss.eof() );
......
// 1999-07-22 bkoz // 1999-07-22 bkoz
// Copyright (C) 1994, 1999, 2001, 2003, 2009 Free Software Foundation, Inc. // Copyright (C) 1994, 1999, 2001, 2003, 2009, 2010
// Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -33,7 +34,6 @@ void test01(void) ...@@ -33,7 +34,6 @@ void test01(void)
std::string str02(str_lit01); std::string str02(str_lit01);
std::string str04; std::string str04;
std::string str05; std::string str05;
std::ios_base::iostate flag3, flag4, flag5;
// template<_CharT, _Traits> // template<_CharT, _Traits>
// basic_istream<_CharT, _Traits>& ws(basic_istream<_Char, _Traits>& is) // basic_istream<_CharT, _Traits>& ws(basic_istream<_Char, _Traits>& is)
...@@ -60,9 +60,6 @@ void test01(void) ...@@ -60,9 +60,6 @@ void test01(void)
VERIFY( str05 == "barbara" ); VERIFY( str05 == "barbara" );
VERIFY( str05 == str04 ); VERIFY( str05 == str04 );
flag3 = std::ios_base::eofbit;
flag4 = std::ios_base::badbit;
flag5 = std::ios_base::failbit;
VERIFY( !iss01.fail() ); VERIFY( !iss01.fail() );
VERIFY( !iss02.fail() ); VERIFY( !iss02.fail() );
VERIFY( !iss01.eof() ); VERIFY( !iss01.eof() );
......
// Copyright (C) 2004, 2009 Free Software Foundation, Inc. // Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -31,7 +31,6 @@ void test01(void) ...@@ -31,7 +31,6 @@ void test01(void)
std::wstring str02(str_lit01); std::wstring str02(str_lit01);
std::wstring str04; std::wstring str04;
std::wstring str05; std::wstring str05;
std::ios_base::iostate flag3, flag4, flag5;
// template<_CharT, _Traits> // template<_CharT, _Traits>
// basic_istream<_CharT, _Traits>& ws(basic_istream<_Char, _Traits>& is) // basic_istream<_CharT, _Traits>& ws(basic_istream<_Char, _Traits>& is)
...@@ -58,9 +57,6 @@ void test01(void) ...@@ -58,9 +57,6 @@ void test01(void)
VERIFY( str05 == L"barbara" ); VERIFY( str05 == L"barbara" );
VERIFY( str05 == str04 ); VERIFY( str05 == str04 );
flag3 = std::ios_base::eofbit;
flag4 = std::ios_base::badbit;
flag5 = std::ios_base::failbit;
VERIFY( !iss01.fail() ); VERIFY( !iss01.fail() );
VERIFY( !iss02.fail() ); VERIFY( !iss02.fail() );
VERIFY( !iss01.eof() ); VERIFY( !iss01.eof() );
......
// 1999-08-16 bkoz // 1999-08-16 bkoz
// Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009 Free Software Foundation // Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009, 2010
// Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -35,9 +36,6 @@ test04() ...@@ -35,9 +36,6 @@ test04()
std::ostringstream oss_02(str_01, std::ios_base::out); std::ostringstream oss_02(str_01, std::ios_base::out);
std::ios_base::iostate statefail;
statefail = std::ios_base::failbit;
// template<_CharT, _Traits> // template<_CharT, _Traits>
// basic_ostream& operator<<(ostream&, const char*) // basic_ostream& operator<<(ostream&, const char*)
for (int i = 0; i < i_max; ++i) for (int i = 0; i < i_max; ++i)
......
// 1999-08-16 bkoz // 1999-08-16 bkoz
// Copyright (C) 1999, 2000, 2002, 2003, 2009 Free Software Foundation // Copyright (C) 1999, 2000, 2002, 2003, 2009, 2010 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -35,9 +35,6 @@ test04() ...@@ -35,9 +35,6 @@ test04()
std::wostringstream oss_02(str_01, std::ios_base::out); std::wostringstream oss_02(str_01, std::ios_base::out);
std::ios_base::iostate statefail;
statefail = std::ios_base::failbit;
// template<_CharT, _Traits> // template<_CharT, _Traits>
// basic_ostream& operator<<(ostream&, const wchar_t*) // basic_ostream& operator<<(ostream&, const wchar_t*)
for (int i = 0; i < i_max; ++i) for (int i = 0; i < i_max; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment