re PR libstdc++/47776 (New libstc++ test failures)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 17 Feb 2011 08:38:11 +0000 (08:38 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 17 Feb 2011 08:38:11 +0000 (08:38 +0000)
2011-02-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/47776
* testsuite/ext/vstring/hash/char/1.cc: Fix.
* testsuite/ext/vstring/hash/wchar_t/1.cc: Likewise.

From-SVN: r170242

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/ext/vstring/hash/char/1.cc
libstdc++-v3/testsuite/ext/vstring/hash/wchar_t/1.cc

index 5b103285c3fe38f7deb7e397e93e83b185f68060..525cf7d558efa9318d370e6df09f2e6c0c5a6e8f 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       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  <jwakely.gcc@gmail.com>
 
        * include/bits/regex.h (basic_regex::traits_type): Add typedef.
index 52140fc83db986621c3483b6ade0b7ce540070c7..db0bc03f096a4c652ea176a95ec1c8e2241ae99f 100644 (file)
@@ -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 );
-
-  ++imap;
-
-  VERIFY( vstring_t(imap->first.c_str()) == "hello" );
-  VERIFY( imap->second == 10 );
+  map_t::const_iterator imap1 = mymap.begin();
+  map_t::const_iterator imap2 = mymap.begin();
+  ++imap2;
+
+  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()
index a5339d1d758c05bca3e728c951bfe2ec5c922c17..83edbe11a8ce30e926ac96d946c8b65de146efb9 100644 (file)
@@ -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 );
-
-  ++imap;
-
-  VERIFY( vstring_t(imap->first.c_str()) == L"hello" );
-  VERIFY( imap->second == 10 );
+  map_t::const_iterator imap1 = mymap.begin();
+  map_t::const_iterator imap2 = mymap.begin();
+  ++imap2;
+
+  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()