1 // Copyright (C) 2004-2013 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
18 // rope (SGI extension)
21 #include <testsuite_hooks.h>
24 "Happy families are all alike; every unhappy family is unhappy in \
27 Everything was in confusion in the Oblonskys' house. The wife \
28 had discovered that the husband was carrying on an intrigue with \
29 a French girl, who had been a governess in their family, and she \
30 had announced to her husband that she could not go on living in \
31 the same house with him. This position of affairs had now lasted \
32 three days, and not only the husband and wife themselves, but all \
33 the members of their family and household, were painfully \
34 conscious of it. Every person in the house felt that there was \
35 so sense in their living together, and that the stray people \
36 brought together by chance in any inn had more in common with one \
37 another than they, the members of the family and household of the \
38 Oblonskys. The wife did not leave her own room, the husband had \
39 not been at home for three days. The children ran wild all over \
40 the house; the English governess quarreled with the housekeeper, \
41 and wrote to a friend asking her to look out for a new situation \
42 for her; the man-cook had walked off the day before just at \
43 dinner time; the kitchen-maid, and the coachman had given \
47 int baselen = sizeof(base) - 1;
49 template<class StringType>
51 multiply(const StringType& s, int n)
62 template <class StringType>
64 mung_substrings(const StringType& s, int len, int n, int skip)
70 StringType tmp = s.substr (start, len);
81 using namespace __gnu_cxx;
82 bool test __attribute__((unused)) = true;
85 r = multiply(crope(base), 100000);
88 r1 = mung_substrings(r, 100000, 500, 73);
90 VERIFY( r1.size() == 50000000 );
91 VERIFY( r1.substr(88888, 6)[0] == 's' );
92 VERIFY( r1.substr(88888, 6)[2] == 'h' );