aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-11-19 21:48:21 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-11-19 21:48:21 +0000
commitc55f9f781b18b97847ca19703b37a57ca9b785d5 (patch)
tree30130e1bfffe2c4717a2519d26b1f27a0a686a22
parent79c70e5a6ceff0601129c2493a0041e34f4fda5b (diff)
downloadgcc-c55f9f781b18b97847ca19703b37a57ca9b785d5.zip
gcc-c55f9f781b18b97847ca19703b37a57ca9b785d5.tar.gz
gcc-c55f9f781b18b97847ca19703b37a57ca9b785d5.tar.bz2
1.cc: In the checks use...
2004-11-19 Paolo Carlini <pcarlini@suse.de> * testsuite/22_locale/time_get/get_date/char/1.cc: In the checks use, more correctly (and consistently with other testcases) the return value of the facet (the iterator arguments are by value). * testsuite/22_locale/time_get/get_date/char/12791.cc: Likewise. * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Likewise. * testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: Likewise. * testsuite/22_locale/time_get/get_monthname/char/1.cc: Likewise. * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Likewise. * testsuite/22_locale/time_get/get_time/char/1.cc: Likewise. * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise. * testsuite/22_locale/time_get/get_weekday/char/1.cc: Likewise. * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Likewise. * testsuite/22_locale/time_get/get_year/char/1.cc: Likewise. * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Likewise. From-SVN: r90938
-rw-r--r--libstdc++-v3/ChangeLog17
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc13
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc15
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc20
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc20
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc20
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc20
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc15
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc15
13 files changed, 119 insertions, 68 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a42024d..f8a6272 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,20 @@
+2004-11-19 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/time_get/get_date/char/1.cc: In the checks
+ use, more correctly (and consistently with other testcases) the
+ return value of the facet (the iterator arguments are by value).
+ * testsuite/22_locale/time_get/get_date/char/12791.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Likewise.
+
2004-11-19 Jonathan Wakely <redi@gcc.gnu.org>
* Makefile.am (doxygen, doxygen-maint, doxygen-man): Remove extra '$'
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
index 714c3b2..eaa9495 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
@@ -67,24 +67,26 @@ void test01()
iterator_type is_it02(iss);
tm time02;
errorstate = good;
- tim_get.get_date(is_it02, end, iss, errorstate, &time02);
+ iterator_type ret02 = tim_get.get_date(is_it02, end, iss, errorstate,
+ &time02);
VERIFY( time02.tm_year == time_bday.tm_year );
VERIFY( time02.tm_mon == time_bday.tm_mon );
VERIFY( time02.tm_mday == time_bday.tm_mday );
VERIFY( errorstate == good );
- VERIFY( *is_it02 == ' ');
+ VERIFY( *ret02 == ' ' );
iss.str("04/04d/71 ");
iterator_type is_it03(iss);
tm time03;
time03.tm_year = 3;
errorstate = good;
- tim_get.get_date(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_date(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_year == 3 );
VERIFY( time03.tm_mon == time_bday.tm_mon );
VERIFY( time03.tm_mday == time_bday.tm_mday );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it03 == 'd');
+ VERIFY( *ret03 == 'd' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc
index 643bbca..7a9f26d 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc
@@ -1,6 +1,6 @@
// 2003-12-03 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2003 Free Software Foundation
+// Copyright (C) 2003, 2004 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -45,17 +45,19 @@ void test01()
iterator_type is_it01(iss);
tm time01;
errorstate = good;
- tim_get.get_date(is_it01, end, iss, errorstate, &time01);
+ iterator_type ret01 = tim_get.get_date(is_it01, end, iss, errorstate,
+ &time01);
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it01 == '6' );
+ VERIFY( *ret01 == '6' );
iss.str("04/38/71");
iterator_type is_it02(iss);
tm time02;
errorstate = good;
- tim_get.get_date(is_it02, end, iss, errorstate, &time02);
+ iterator_type ret02 = tim_get.get_date(is_it02, end, iss, errorstate,
+ &time02);
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it02 == '8' );
+ VERIFY( *ret02 == '8' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
index d724f45..d6d5c8a 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
@@ -41,7 +41,8 @@ void test01()
wistringstream iss;
iss.imbue(loc_c);
- const time_get<wchar_t>& tim_get = use_facet<time_get<wchar_t> >(iss.getloc());
+ const time_get<wchar_t>& tim_get =
+ use_facet<time_get<wchar_t> >(iss.getloc());
const ios_base::iostate good = ios_base::goodbit;
ios_base::iostate errorstate = good;
@@ -67,24 +68,26 @@ void test01()
iterator_type is_it02(iss);
tm time02;
errorstate = good;
- tim_get.get_date(is_it02, end, iss, errorstate, &time02);
+ iterator_type ret02 = tim_get.get_date(is_it02, end, iss, errorstate,
+ &time02);
VERIFY( time02.tm_year == time_bday.tm_year );
VERIFY( time02.tm_mon == time_bday.tm_mon );
VERIFY( time02.tm_mday == time_bday.tm_mday );
VERIFY( errorstate == good );
- VERIFY( *is_it02 == L' ' );
+ VERIFY( *ret02 == L' ' );
iss.str(L"04/04d/71 ");
iterator_type is_it03(iss);
tm time03;
time03.tm_year = 3;
errorstate = good;
- tim_get.get_date(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_date(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_year == 3 );
VERIFY( time03.tm_mon == time_bday.tm_mon );
VERIFY( time03.tm_mday == time_bday.tm_mday );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it03 == L'd' );
+ VERIFY( *ret03 == L'd' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc
index d06fca8..1a63a0d 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc
@@ -1,6 +1,6 @@
// 2003-12-03 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2003 Free Software Foundation
+// Copyright (C) 2003, 2004 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,7 +36,8 @@ void test01()
iterator_type end;
wistringstream iss;
- const time_get<wchar_t>& tim_get = use_facet<time_get<wchar_t> >(iss.getloc());
+ const time_get<wchar_t>& tim_get =
+ use_facet<time_get<wchar_t> >(iss.getloc());
const ios_base::iostate good = ios_base::goodbit;
ios_base::iostate errorstate = good;
@@ -45,17 +46,19 @@ void test01()
iterator_type is_it01(iss);
tm time01;
errorstate = good;
- tim_get.get_date(is_it01, end, iss, errorstate, &time01);
+ iterator_type ret01 = tim_get.get_date(is_it01, end, iss, errorstate,
+ &time01);
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it01 == L'6' );
+ VERIFY( *ret01 == L'6' );
iss.str(L"04/38/71");
iterator_type is_it02(iss);
tm time02;
errorstate = good;
- tim_get.get_date(is_it02, end, iss, errorstate, &time02);
+ iterator_type ret02 = tim_get.get_date(is_it02, end, iss, errorstate,
+ &time02);
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it02 == L'8' );
+ VERIFY( *ret02 == L'8' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
index b96007b..5de1464 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
@@ -70,39 +70,43 @@ void test01()
iterator_type is_it03(iss);
tm time03;
errorstate = good;
- tim_get.get_monthname(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_monthname(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_mon == time_bday.tm_mon );
VERIFY( errorstate == good );
- VERIFY( *is_it03 == ' ');
+ VERIFY( *ret03 == ' ' );
iss.str("Aar");
iterator_type is_it04(iss);
tm time04;
time04.tm_mon = 5;
errorstate = good;
- tim_get.get_monthname(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_monthname(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time04.tm_mon == 5 );
- VERIFY( *is_it04 == 'a');
+ VERIFY( *ret04 == 'a' );
VERIFY( errorstate == ios_base::failbit );
iss.str("December ");
iterator_type is_it05(iss);
tm time05;
errorstate = good;
- tim_get.get_monthname(is_it05, end, iss, errorstate, &time05);
+ iterator_type ret05 = tim_get.get_monthname(is_it05, end, iss, errorstate,
+ &time05);
VERIFY( time05.tm_mon == 11 );
VERIFY( errorstate == good );
- VERIFY( *is_it05 == ' ');
+ VERIFY( *ret05 == ' ' );
iss.str("Decelember ");
iterator_type is_it06(iss);
tm time06;
time06.tm_mon = 4;
errorstate = good;
- tim_get.get_monthname(is_it06, end, iss, errorstate, &time06);
+ iterator_type ret06 = tim_get.get_monthname(is_it06, end, iss, errorstate,
+ &time06);
VERIFY( time06.tm_mon == 4 );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it06 == 'l');
+ VERIFY( *ret06 == 'l' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
index 9eb219f..0c97e64 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
@@ -70,39 +70,43 @@ void test01()
iterator_type is_it03(iss);
tm time03;
errorstate = good;
- tim_get.get_monthname(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_monthname(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_mon == time_bday.tm_mon );
VERIFY( errorstate == good );
- VERIFY( *is_it03 == L' ' );
+ VERIFY( *ret03 == L' ' );
iss.str(L"Aar");
iterator_type is_it04(iss);
tm time04;
time04.tm_mon = 5;
errorstate = good;
- tim_get.get_monthname(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_monthname(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time04.tm_mon == 5 );
- VERIFY( *is_it04 == L'a' );
+ VERIFY( *ret04 == L'a' );
VERIFY( errorstate == ios_base::failbit );
iss.str(L"December ");
iterator_type is_it05(iss);
tm time05;
errorstate = good;
- tim_get.get_monthname(is_it05, end, iss, errorstate, &time05);
+ iterator_type ret05 = tim_get.get_monthname(is_it05, end, iss, errorstate,
+ &time05);
VERIFY( time05.tm_mon == 11 );
VERIFY( errorstate == good );
- VERIFY( *is_it05 == L' ' );
+ VERIFY( *ret05 == L' ' );
iss.str(L"Decelember ");
iterator_type is_it06(iss);
tm time06;
time06.tm_mon = 4;
errorstate = good;
- tim_get.get_monthname(is_it06, end, iss, errorstate, &time06);
+ iterator_type ret06 = tim_get.get_monthname(is_it06, end, iss, errorstate,
+ &time06);
VERIFY( time06.tm_mon == 4 );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it06 == L'l' );
+ VERIFY( *ret06 == L'l' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
index adbc28e..a06b6bb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
@@ -87,9 +87,10 @@ void test01()
iterator_type is_it04(iss);
tm time04;
errorstate = good;
- tim_get.get_time(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_time(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time01.tm_hour == time_bday.tm_hour );
- VERIFY( *is_it04 == 'a');
+ VERIFY( *ret04 == 'a' );
VERIFY( errorstate == ios_base::failbit );
// inspection of named locales, de_DE
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
index f1b1c42..4e7137e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
@@ -87,9 +87,10 @@ void test01()
iterator_type is_it04(iss);
tm time04;
errorstate = good;
- tim_get.get_time(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_time(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time01.tm_hour == time_bday.tm_hour );
- VERIFY( *is_it04 == L'a' );
+ VERIFY( *ret04 == L'a' );
VERIFY( errorstate == ios_base::failbit );
// inspection of named locales, de_DE
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
index 1d6da0a..9141208 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
@@ -74,39 +74,43 @@ void test01()
iterator_type is_it03(iss);
tm time03;
errorstate = good;
- tim_get.get_weekday(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_weekday(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_wday == time_bday.tm_wday );
VERIFY( errorstate == good );
- VERIFY( *is_it03 == ' ');
+ VERIFY( *ret03 == ' ' );
iss.str("San");
iterator_type is_it04(iss);
tm time04;
time04.tm_wday = 4;
errorstate = good;
- tim_get.get_weekday(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_weekday(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time04.tm_wday == 4 );
- VERIFY( *is_it04 == 'n');
+ VERIFY( *ret04 == 'n' );
VERIFY( errorstate == ios_base::failbit );
iss.str("Tuesday ");
iterator_type is_it05(iss);
tm time05;
errorstate = good;
- tim_get.get_weekday(is_it05, end, iss, errorstate, &time05);
+ iterator_type ret05 = tim_get.get_weekday(is_it05, end, iss, errorstate,
+ &time05);
VERIFY( time05.tm_wday == 2 );
VERIFY( errorstate == good );
- VERIFY( *is_it05 == ' ');
+ VERIFY( *ret05 == ' ' );
iss.str("Tuesducky "); // Kind of like Fryday, without the swirls.
iterator_type is_it06(iss);
tm time06;
time06.tm_wday = 4;
errorstate = good;
- tim_get.get_weekday(is_it06, end, iss, errorstate, &time06);
+ iterator_type ret06 = tim_get.get_weekday(is_it06, end, iss, errorstate,
+ &time06);
VERIFY( time06.tm_wday == 4 );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it06 == 'u');
+ VERIFY( *ret06 == 'u' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
index 1852b9b..76555ae 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
@@ -74,39 +74,43 @@ void test01()
iterator_type is_it03(iss);
tm time03;
errorstate = good;
- tim_get.get_weekday(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_weekday(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_wday == time_bday.tm_wday );
VERIFY( errorstate == good );
- VERIFY( *is_it03 == L' ' );
+ VERIFY( *ret03 == L' ' );
iss.str(L"San");
iterator_type is_it04(iss);
tm time04;
time04.tm_wday = 4;
errorstate = good;
- tim_get.get_weekday(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_weekday(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time04.tm_wday == 4 );
- VERIFY( *is_it04 == L'n' );
+ VERIFY( *ret04 == L'n' );
VERIFY( errorstate == ios_base::failbit );
iss.str(L"Tuesday ");
iterator_type is_it05(iss);
tm time05;
errorstate = good;
- tim_get.get_weekday(is_it05, end, iss, errorstate, &time05);
+ iterator_type ret05 = tim_get.get_weekday(is_it05, end, iss, errorstate,
+ &time05);
VERIFY( time05.tm_wday == 2 );
VERIFY( errorstate == good );
- VERIFY( *is_it05 == L' ' );
+ VERIFY( *ret05 == L' ' );
iss.str(L"Tuesducky "); // Kind of like Fryday, without the swirls.
iterator_type is_it06(iss);
tm time06;
time06.tm_wday = 4;
errorstate = good;
- tim_get.get_weekday(is_it06, end, iss, errorstate, &time06);
+ iterator_type ret06 = tim_get.get_weekday(is_it06, end, iss, errorstate,
+ &time06);
VERIFY( time06.tm_wday == 4 );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it06 == L'u' );
+ VERIFY( *ret06 == L'u' );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
index e558cba..98c009c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
@@ -65,29 +65,32 @@ void test01()
iterator_type is_it02(iss);
tm time02;
errorstate = good;
- tim_get.get_year(is_it02, end, iss, errorstate, &time02);
+ iterator_type ret02 = tim_get.get_year(is_it02, end, iss, errorstate,
+ &time02);
VERIFY( time02.tm_year == time_bday.tm_year );
VERIFY( errorstate == good );
- VERIFY( *is_it02 == ' ');
+ VERIFY( *ret02 == ' ' );
iss.str("197d1 ");
iterator_type is_it03(iss);
tm time03;
time03.tm_year = 3;
errorstate = good;
- tim_get.get_year(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_year(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_year == 3 );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it03 == 'd');
+ VERIFY( *ret03 == 'd' );
iss.str("71d71");
iterator_type is_it04(iss);
tm time04;
errorstate = good;
- tim_get.get_year(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_year(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time04.tm_year == time_bday.tm_year );
VERIFY( errorstate == good );
- VERIFY( *is_it03 == 'd');
+ VERIFY( *ret04 == 'd' );
iss.str("71");
iterator_type is_it05(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
index 0724930..876e57b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
@@ -65,29 +65,32 @@ void test01()
iterator_type is_it02(iss);
tm time02;
errorstate = good;
- tim_get.get_year(is_it02, end, iss, errorstate, &time02);
+ iterator_type ret02 = tim_get.get_year(is_it02, end, iss, errorstate,
+ &time02);
VERIFY( time02.tm_year == time_bday.tm_year );
VERIFY( errorstate == good );
- VERIFY( *is_it02 == L' ' );
+ VERIFY( *ret02 == L' ' );
iss.str(L"197d1 ");
iterator_type is_it03(iss);
tm time03;
time03.tm_year = 3;
errorstate = good;
- tim_get.get_year(is_it03, end, iss, errorstate, &time03);
+ iterator_type ret03 = tim_get.get_year(is_it03, end, iss, errorstate,
+ &time03);
VERIFY( time03.tm_year == 3 );
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *is_it03 == L'd' );
+ VERIFY( *ret03 == L'd' );
iss.str(L"71d71");
iterator_type is_it04(iss);
tm time04;
errorstate = good;
- tim_get.get_year(is_it04, end, iss, errorstate, &time04);
+ iterator_type ret04 = tim_get.get_year(is_it04, end, iss, errorstate,
+ &time04);
VERIFY( time04.tm_year == time_bday.tm_year );
VERIFY( errorstate == good );
- VERIFY( *is_it03 == L'd' );
+ VERIFY( *ret04 == L'd' );
iss.str(L"71");
iterator_type is_it05(iss);