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 4672501..6f5eceb 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 6944627..2198077 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 3bd853a..d6202c9 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;