diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-11-29 13:29:54 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-11-29 13:29:54 +0000 |
commit | 4f70f9d237bd16869e6f6146b3709cbefa3dffe9 (patch) | |
tree | 51e1ba5520c82d0ff88e246cc4f7fa5fb9582f6c /libstdc++-v3 | |
parent | 22bbc492b2e73d9132cd5bbfd6771f0d8e087895 (diff) | |
download | gcc-4f70f9d237bd16869e6f6146b3709cbefa3dffe9.zip gcc-4f70f9d237bd16869e6f6146b3709cbefa3dffe9.tar.gz gcc-4f70f9d237bd16869e6f6146b3709cbefa3dffe9.tar.bz2 |
18654.cc: Use better names.
2004-11-29 Paolo Carlini <pcarlini@suse.de>
* testsuite/21_strings/basic_string/capacity/char/18654.cc: Use
better names.
* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Same.
From-SVN: r91469
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc | 8 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b0d82f8..95eae13 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2004-11-29 Paolo Carlini <pcarlini@suse.de> + * testsuite/21_strings/basic_string/capacity/char/18654.cc: Use + better names. + * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Same. + +2004-11-29 Paolo Carlini <pcarlini@suse.de> + PR libstdc++/18654 * include/bits/basic_string.tcc (_Rep::_S_create): When shrinking, do not round to pagesize. 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 16dd7ea9e..5194d81 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 @@ -34,9 +34,9 @@ void test01() // Our current implementation provides exact shrink-to-size // and shrink-to-fit (in the future, maybe this will change // for short strings). - size_type min = 2 << 0; - size_type max = 2 << 20; - for (size_type i = min; i <= max; i *= 2) + const size_type minsize = 2 << 0; + const size_type maxsize = 2 << 20; + for (size_type i = minsize; i <= maxsize; i *= 2) { string str(i, 'x'); str.reserve(3 * i); @@ -49,7 +49,7 @@ void test01() } } -int main() +int main() { test01(); return 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 1b683bb..38623eb 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 @@ -34,9 +34,9 @@ void test01() // Our current implementation provides exact shrink-to-size // and shrink-to-fit (in the future, maybe this will change // for short strings). - size_type min = 2 << 0; - size_type max = 2 << 20; - for (size_type i = min; i <= max; i *= 2) + const size_type minsize = 2 << 0; + const size_type maxsize = 2 << 20; + for (size_type i = minsize; i <= maxsize; i *= 2) { wstring str(i, L'x'); str.reserve(3 * i); |