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:
Steve Ellcey 2012-12-13 19:55:13 +00:00 committed by Steve Ellcey
parent e1df04775d
commit 01f4c82194
5 changed files with 36 additions and 4 deletions

View File

@ -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.

View File

@ -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');

View File

@ -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');

View File

@ -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());

View File

@ -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());