diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-11-14 17:24:42 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-11-14 17:24:42 +0000 |
commit | 230b4edeee99f2585aefe233f6832cb2d4d68631 (patch) | |
tree | 742e0ecc7018dbd9c9f3184d3885ca9d76349973 /libstdc++-v3 | |
parent | bfc6afd929477fda2db898fe72224891cecf4c8c (diff) | |
download | gcc-230b4edeee99f2585aefe233f6832cb2d4d68631.zip gcc-230b4edeee99f2585aefe233f6832cb2d4d68631.tar.gz gcc-230b4edeee99f2585aefe233f6832cb2d4d68631.tar.bz2 |
Fix std::wstring capacity test for short wchar_t
* 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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4672501..6f5eceb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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. diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc index 6944627..2198077 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc @@ -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; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc index 3bd853a..d6202c9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc @@ -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; |