mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-27 04:55:01 +08:00
18654.cc: Shrink memory usage under simulator.
2012-12-13 Steve Ellcey <sellcey@mips.com> * testsuite/21_strings/basic_string/capacity/char/18654.cc: Shrink memory usage under simulator. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Ditto. * testsuite/22_locale/collate/transform/char/28277.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/28277.cc: Ditto. From-SVN: r194488
This commit is contained in:
parent
e1df04775d
commit
01f4c82194
@ -1,3 +1,11 @@
|
||||
2012-12-13 Steve Ellcey <sellcey@mips.com>
|
||||
|
||||
* testsuite/21_strings/basic_string/capacity/char/18654.cc: Shrink
|
||||
memory usage under simulator.
|
||||
* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Ditto.
|
||||
* testsuite/22_locale/collate/transform/char/28277.cc: Ditto.
|
||||
* testsuite/22_locale/collate/transform/wchar_t/28277.cc: Ditto.
|
||||
|
||||
2012-12-12 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* doc/xml/manual/documentation_hacking.xml: Fix validation issue.
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
// 21.3.3 string capacity
|
||||
|
||||
// { dg-options "-DMAX_SIZE=16" { target simulator } }
|
||||
|
||||
#ifndef MAX_SIZE
|
||||
#define MAX_SIZE 20
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
@ -34,7 +40,7 @@ void test01()
|
||||
// and shrink-to-fit (in the future, maybe this will change
|
||||
// for short strings).
|
||||
const size_type minsize = 2 << 0;
|
||||
const size_type maxsize = 2 << 20;
|
||||
const size_type maxsize = 2 << MAX_SIZE;
|
||||
for (size_type i = minsize; i <= maxsize; i *= 2)
|
||||
{
|
||||
string str(i, 'x');
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
// 21.3.3 string capacity
|
||||
|
||||
// { dg-options "-DMAX_SIZE=16" { target simulator } }
|
||||
|
||||
#ifndef MAX_SIZE
|
||||
#define MAX_SIZE 20
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
@ -34,7 +40,7 @@ void test01()
|
||||
// and shrink-to-fit (in the future, maybe this will change
|
||||
// for short strings).
|
||||
const size_type minsize = 2 << 0;
|
||||
const size_type maxsize = 2 << 20;
|
||||
const size_type maxsize = 2 << MAX_SIZE;
|
||||
for (size_type i = minsize; i <= maxsize; i *= 2)
|
||||
{
|
||||
wstring str(i, L'x');
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
// 22.2.4.1.1 collate members
|
||||
|
||||
// { dg-options "-DMAX_SIZE=1000000" { target simulator } }
|
||||
|
||||
#ifndef MAX_SIZE
|
||||
#define MAX_SIZE 10000000
|
||||
#endif
|
||||
|
||||
#include <locale>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
@ -36,7 +42,7 @@ void test01()
|
||||
// cache the collate facets
|
||||
const collate<char>& coll_c = use_facet<collate<char> >(loc_c);
|
||||
|
||||
const string_type sstr(10000000, 'a');
|
||||
const string_type sstr(MAX_SIZE, 'a');
|
||||
|
||||
const string_type dstr = coll_c.transform(sstr.data(),
|
||||
sstr.data() + sstr.size());
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
// 22.2.4.1.1 collate members
|
||||
|
||||
// { dg-options "-DMAX_SIZE=100000" { target simulator } }
|
||||
|
||||
#ifndef MAX_SIZE
|
||||
#define MAX_SIZE 10000000
|
||||
#endif
|
||||
|
||||
#include <locale>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
@ -36,7 +42,7 @@ void test01()
|
||||
// cache the collate facets
|
||||
const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c);
|
||||
|
||||
const string_type sstr(10000000, L'a');
|
||||
const string_type sstr(MAX_SIZE, L'a');
|
||||
|
||||
const string_type dstr = coll_c.transform(sstr.data(),
|
||||
sstr.data() + sstr.size());
|
||||
|
Loading…
Reference in New Issue
Block a user