aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/22_locale
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2017-11-20 22:30:28 +0000
committerFrançois Dumont <fdumont@gcc.gnu.org>2017-11-20 22:30:28 +0000
commite324f9cb921234b80c809f8ffbd7ef2d55d583bc (patch)
treed38add252c2ed6e4905d28d1855e6e3306405a91 /libstdc++-v3/testsuite/22_locale
parent9be0a9d6d20e5cb3c50f64b5a9a49070b9a0f267 (diff)
downloadgcc-e324f9cb921234b80c809f8ffbd7ef2d55d583bc.zip
gcc-e324f9cb921234b80c809f8ffbd7ef2d55d583bc.tar.gz
gcc-e324f9cb921234b80c809f8ffbd7ef2d55d583bc.tar.bz2
streambuf_iterator.h (istreambuf_iterator<>): Declare std::advance for istreambuf_iterator of char types to be friend.
2017-11-20 François Dumont <fdumont@gcc.gnu.org> * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare std::advance for istreambuf_iterator of char types to be friend. (std::advance(istreambuf_iterator&, _Distance)): New overload. * include/std/streambuf (basic_streambuf<>): Declare std::advance for istreambuf_iterator of char types to be friend. * testsuite/22_locale/money_get/get/char/9.cc: Have istreambuf_iterator created on the fly when calling money_get<>::get. * testsuite/22_locale/money_get/get/wchar_t/9.cc: Likewise. * testsuite/24_iterators/istreambuf_iterator/debug/1_neg.cc: New. * testsuite/24_iterators/istreambuf_iterator/debug/2_neg.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/char/1.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/char/1_neg.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/char/2.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/char/2_neg.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/char/3_neg.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/1.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/1_neg.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2_neg.cc: New. * testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/3_neg.cc: New. * testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc: Leverage on std::advance overload. * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc: Likewise. From-SVN: r254972
Diffstat (limited to 'libstdc++-v3/testsuite/22_locale')
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/9.cc11
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/9.cc11
2 files changed, 10 insertions, 12 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/9.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/9.cc
index 9b69956..476e38f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/9.cc
@@ -41,7 +41,6 @@ int main()
= std::use_facet<std::money_get<char> >(liffey.getloc());
typedef std::istreambuf_iterator<char> iterator_type;
- iterator_type is(liffey);
iterator_type end;
std::ios_base::iostate err01 = std::ios_base::goodbit;
@@ -50,7 +49,7 @@ int main()
// Feed it 1 digit too many, which should fail.
liffey.str("12.3456");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if (! (err01 & std::ios_base::failbit ))
fails |= 0x01;
@@ -58,7 +57,7 @@ int main()
// Feed it exactly what it wants, which should succeed.
liffey.str("12.345");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if ( err01 & std::ios_base::failbit )
fails |= 0x02;
@@ -66,7 +65,7 @@ int main()
// Feed it 1 digit too few, which should fail.
liffey.str("12.34");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if (! ( err01 & std::ios_base::failbit ))
fails |= 0x04;
@@ -74,7 +73,7 @@ int main()
// Feed it only a decimal-point, which should fail.
liffey.str("12.");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if (! (err01 & std::ios_base::failbit ))
fails |= 0x08;
@@ -82,7 +81,7 @@ int main()
// Feed it no decimal-point at all, which should succeed.
liffey.str("12");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if ( err01 & std::ios_base::failbit )
fails |= 0x10;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/9.cc
index a08a713..e5f8def 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/9.cc
@@ -41,7 +41,6 @@ int main()
= std::use_facet<std::money_get<wchar_t> >(liffey.getloc());
typedef std::istreambuf_iterator<wchar_t> iterator_type;
- iterator_type is(liffey);
iterator_type end;
std::ios_base::iostate err01 = std::ios_base::goodbit;
@@ -50,7 +49,7 @@ int main()
// Feed it 1 digit too many, which should fail.
liffey.str(L"12.3456");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if (! (err01 & std::ios_base::failbit ))
fails |= 0x01;
@@ -58,7 +57,7 @@ int main()
// Feed it exactly what it wants, which should succeed.
liffey.str(L"12.345");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if ( err01 & std::ios_base::failbit )
fails |= 0x02;
@@ -66,7 +65,7 @@ int main()
// Feed it 1 digit too few, which should fail.
liffey.str(L"12.34");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if (! ( err01 & std::ios_base::failbit ))
fails |= 0x04;
@@ -74,7 +73,7 @@ int main()
// Feed it only a decimal-point, which should fail.
liffey.str(L"12.");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if (! (err01 & std::ios_base::failbit ))
fails |= 0x08;
@@ -82,7 +81,7 @@ int main()
// Feed it no decimal-point at all, which should succeed.
liffey.str(L"12");
- greed.get(is, end, false, liffey, err01, coins);
+ greed.get(liffey, end, false, liffey, err01, coins);
if ( err01 & std::ios_base::failbit )
fails |= 0x10;