diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5b103285c3f..525cf7d558e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2011-02-17 Paolo Carlini + + PR libstdc++/47776 + * testsuite/ext/vstring/hash/char/1.cc: Fix. + * testsuite/ext/vstring/hash/wchar_t/1.cc: Likewise. + 2011-02-17 Jonathan Wakely * include/bits/regex.h (basic_regex::traits_type): Add typedef. diff --git a/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc b/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc index 52140fc83db..db0bc03f096 100644 --- a/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc +++ b/libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc @@ -37,15 +37,14 @@ void test01() VERIFY( mymap.size() == 2 ); - map_t::const_iterator imap = mymap.begin(); - - VERIFY( vstring_t(imap->first.c_str()) == "hi" ); - VERIFY( imap->second == 20 ); + map_t::const_iterator imap1 = mymap.begin(); + map_t::const_iterator imap2 = mymap.begin(); + ++imap2; - ++imap; - - VERIFY( vstring_t(imap->first.c_str()) == "hello" ); - VERIFY( imap->second == 10 ); + VERIFY( ((imap1->first == "hello" && imap1->second == 10 + && imap2->first == "hi" && imap2->second == 20) + || (imap1->first == "hi" && imap1->second == 20 + && imap2->first == "hello" && imap2->second == 10)) ); } int main() diff --git a/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc b/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc index a5339d1d758..83edbe11a8c 100644 --- a/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc @@ -37,15 +37,14 @@ void test01() VERIFY( mymap.size() == 2 ); - map_t::const_iterator imap = mymap.begin(); - - VERIFY( vstring_t(imap->first.c_str()) == L"hi" ); - VERIFY( imap->second == 20 ); + map_t::const_iterator imap1 = mymap.begin(); + map_t::const_iterator imap2 = mymap.begin(); + ++imap2; - ++imap; - - VERIFY( vstring_t(imap->first.c_str()) == L"hello" ); - VERIFY( imap->second == 10 ); + VERIFY( ((imap1->first == L"hello" && imap1->second == 10 + && imap2->first == L"hi" && imap2->second == 20) + || (imap1->first == L"hi" && imap1->second == 20 + && imap2->first == L"hello" && imap2->second == 10)) ); } int main()