OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libstdc++-v3/] [testsuite/] [22_locale/] [collate/] [transform/] [wchar_t/] [28277.cc] - Diff between revs 424 and 565

Show entire file | Details | Blame | View Log

Rev 424 Rev 565
Line 17... Line 17...
// with this library; see the file COPYING3.  If not see
// with this library; see the file COPYING3.  If not see
// <http://www.gnu.org/licenses/>.
// <http://www.gnu.org/licenses/>.
 
 
// 22.2.4.1.1 collate members
// 22.2.4.1.1 collate members
 
 
 
// { dg-options " -DSTR_LEN=100000" { target { or32-*-elf } } }
 
 
 
#ifndef STR_LEN
 
#define STR_LEN 10000000
 
#endif
 
 
#include <locale>
#include <locale>
#include <testsuite_hooks.h>
#include <testsuite_hooks.h>
 
 
// libstdc++/28277
// libstdc++/28277
void test01()
void test01()
Line 34... Line 40...
  locale loc_c = locale::classic();
  locale loc_c = locale::classic();
 
 
  // cache the collate facets
  // cache the collate facets
  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c);
  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c);
 
 
  const string_type sstr(10000000, L'a');
  const string_type sstr(STR_LEN, L'a');
 
 
  const string_type dstr = coll_c.transform(sstr.data(),
  const string_type dstr = coll_c.transform(sstr.data(),
                                            sstr.data() + sstr.size());
                                            sstr.data() + sstr.size());
 
 
  VERIFY( dstr == sstr );
  VERIFY( dstr == sstr );

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.