Fix std::wstring capacity test for short wchar_t
authorJonathan Wakely <jwakely@redhat.com>
Sat, 14 Nov 2015 17:24:42 +0000 (17:24 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 14 Nov 2015 17:24:42 +0000 (17:24 +0000)
* testsuite/21_strings/basic_string/capacity/char/18654.cc: Use
real minimum capacity.
* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
Likewise.

From-SVN: r230378

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc
libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc

index 4672501b682b1933ce823cd5ae937b5eb9f9b582..6f5ecebe3298496e782ce1ae5e58e0eb0d63e044 100644 (file)
@@ -1,3 +1,10 @@
+2015-11-14  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/21_strings/basic_string/capacity/char/18654.cc: Use
+       real minimum capacity.
+       * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
+       Likewise.
+
 2015-11-13  David Edelsohn  <dje.gcc@gmail.com>
 
        * testsuite/experimental/random/randint.cc: Add dg-add-options tls.
index 694462768f69ca6db46b457d93c76a9a74f2e813..21980777ecdaaa05642803d4ae8e0eb25b2d62ce 100644 (file)
@@ -38,7 +38,7 @@ void test01()
 
 #if _GLIBCXX_USE_CXX11_ABI
   // Can't shrink below small string size.
-  const size_type minsize = 2 << 3;
+  const size_type minsize = string().capacity() + 1;
 #else
   // Exact shrink-to-size and shrink-to-fit
   const size_type minsize = 2 << 0;
index 3bd853a42bb60975d1172dd88cbc12f82e17f8b0..d6202c9804a31b0517f9c73063a51346a6b61b66 100644 (file)
@@ -38,7 +38,7 @@ void test01()
 
 #if _GLIBCXX_USE_CXX11_ABI
   // Can't shrink below small string size.
-  const size_type minsize = 2 << 1;
+  const size_type minsize = wstring().capacity() + 1;
 #else
   // Exact shrink-to-size and shrink-to-fit
   const size_type minsize = 2 << 0;