2012-12-13 Steve Ellcey <sellcey@mips.com>
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2012 19:55:13 +0000 (19:55 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2012 19:55:13 +0000 (19:55 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194488 138bc75d-0d04-0410-961f-82ee72b054a4

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
libstdc++-v3/testsuite/22_locale/collate/transform/char/28277.cc
libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/28277.cc

index bde1123..84034d3 100644 (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.
index e9fa200..78af79a 100644 (file)
 
 // 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');
index fd51175..df75f09 100644 (file)
 
 // 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');
index bf8c494..7b94c7d 100644 (file)
 
 // 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());
index 4f21169..56ad605 100644 (file)
 
 // 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());