Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/iostreams/test/detail/sequence.hpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 17.1 KB
Line 
1// (C) Copyright Jonathan Turkanis 2004
2// Distributed under the Boost Software License, Version 1.0. (See accompanying
3// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
4
5// See http://www.boost.org/libs/iostreams for documentation.
6
7#ifndef BOOST_IOSTREAMS_TEST_SEQUENCE_HPP_INCLUDED
8#define BOOST_IOSTREAMS_TEST_SEQUENCE_HPP_INCLUDED
9
10#include <algorithm>
11#include <iterator>
12#include <string.h>  // strlen.
13#include <vector>
14#include <boost/iostreams/detail/default_arg.hpp>
15#include "./constants.hpp"
16
17namespace boost { namespace iostreams { namespace test {
18
19template<typename Ch = BOOST_IOSTREAMS_DEFAULT_ARG(char) >
20struct test_sequence : public std::vector<Ch> {
21    test_sequence()
22        {
23            const Ch* buf = test::detail::data((Ch*)0);
24            this->reserve(data_reps * data_length());
25            for (int z = 0; z < data_reps; ++z)
26                std::copy(buf, buf + data_length(), std::back_inserter(*this));
27        }
28};
29
30const char* text = 
31    "The Lord spoke to Moses saying: Speak to the children of "
32    "Israel, and have them take for Me an offering; from every "
33    "person whose heart inspires him to generosity, you shall take "
34    "My offering. And this is the offering that you shall take "
35    "from them: gold, silver, and copper; blue, purple, and "
36    "crimson wool; linen and goat hair; ram skins dyed red, "
37    "tachash skins, and acacia wood; oil for lighting, spices for "
38    "the anointing oil and for the incense; shoham stones and "
39    "filling stones for the ephod and for the choshen. And they "
40    "shall make Me a sanctuary and I will dwell in their midst "
41    "according to all that I show you, the pattern of the Mishkan "
42    "and the pattern of all its vessels; and so shall you do. They "
43    "shall make an ark of acacia wood, two and a half cubits its "
44    "length, a cubit and a half its width, and a cubit and a half "
45    "its height. And you shall overlay it with pure gold; from "
46    "inside and from outside you shall overlay it, and you shall "
47    "make upon it a golden crown all around. And you shall cast "
48    "four golden rings for it, and you shall place them upon its "
49    "four corners, two rings on its one side, and two rings on its "
50    "other side. And you shall make poles of acacia wood and you "
51    "shall overlay them with gold. And you shall bring the poles "
52    "into the rings on the sides of the ark, to carry the ark with "
53    "them. The poles of the ark shall be in the rings; they shall "
54    "not be removed from it. And you shall place into the ark the "
55    "testimony, which I will give you. "
56    "And you shall make an ark cover of pure gold, two and a half "
57    "cubits its length and a cubit and a half its width. And you "
58    "shall make two golden cherubim; you shall make them of "
59    "hammered work, from the two ends of the ark cover. And make "
60    "one cherub from the one end and the other cherub from the "
61    "other end; from the ark cover you shall make the cherubim on "
62    "its two ends. The cherubim shall have their wings spread "
63    "upwards, shielding the ark cover with their wings, with their "
64    "faces toward one another; [turned] toward the ark cover shall "
65    "be the faces of the cherubim. And you shall place the ark "
66    "cover on the ark from above, and into the ark you shall place "
67    "the testimony, which I will give you. I will arrange My "
68    "meetings with you there, and I will speak with you from atop "
69    "the ark cover from between the two cherubim that are upon the "
70    "Ark of the Testimony, all that I will command you unto the "
71    "children of Israel. And you shall make a table of acacia "
72    "wood, two cubits its length, one cubit its width, and a cubit "
73    "and a half its height. And you shall overlay it with pure "
74    "gold, and you shall make for it a golden crown all around. "
75    "And you shall make for it a frame a handbreadth [wide] all "
76    "around, and you shall make a golden crown for its frame all "
77    "around. And you shall make for it four golden rings, and you "
78    "shall place the rings on the four corners that are on its "
79    "four legs. The rings shall be opposite the frame as holders "
80    "for the poles [with which] to carry the table. And you shall "
81    "make the poles of acacia wood, and you shall overlay them "
82    "with gold, and the table shall be carried with them. And you "
83    "shall make its forms, its spoons, its half pipes, and its "
84    "supports with which it will be covered; of pure gold you "
85    "shall make them. And you shall place on the table showbread "
86    "before Me at all times. "
87    "And you shall make a menorah of pure gold. The menorah shall "
88    "be made of hammered work; its base and its stem, its goblets, "
89    "its knobs, and its flowers shall [all] be [one piece] with "
90    "it. And six branches coming out of its sides: three menorah "
91    "branches from its one side and three menorah branches from "
92    "its second side. Three decorated goblets on one branch, a "
93    "knob and a flower, and three decorated goblets on one branch, "
94    "a knob and a flower; so for the six branches that come out of "
95    "the menorah. And on [the stem of] the menorah [shall be] four "
96    "decorated goblets, its knobs and its flowers. And a knob under "
97    "the two branches from it, and a knob under the two branches "
98    "from it, and a knob under the two branches from it; so for the "
99    "six branches that come out of the menorah. Their knobs and "
100    "their branches shall [all] be [one piece] with it; all of it "
101
102    "[shall be] one hammered mass of pure gold. And you shall make "
103    "its lamps seven, and he shall kindle its lamps [so that they] "
104    "shed light toward its face. And its tongs and its scoops "
105    "[shall be] of pure gold. He shall make it of a talent of pure "
106    "gold, with all these implements. Now see and make according "
107    "to their pattern, which you are shown on the mountain. "
108    "And the Mishkan you shall make out of ten curtains "
109    "[consisting] of twisted fine linen, and blue, purple, and "
110    "crimson wool. A cherubim design of the work of a master "
111    "weaver you shall make them. The length of one curtain [shall "
112    "be] twenty eight cubits, and the width of one curtain [shall "
113    "be] four cubits; the same measure for all the curtains. Five "
114    "of these curtains shall be joined to one another, and [the "
115    "other] five curtains shall [also] be joined to one another. "
116    "And you shall make loops of blue wool on the edge of one "
117    "curtain [that is] at the edge of the [first] set, and so "
118    "shall you do on the edge of the outermost curtain of the "
119    "second set. You shall make fifty loops on [the edge of] one "
120    "curtain, and you shall make fifty loops on the edge of the "
121    "curtain in the second set; the loops shall correspond to one "
122    "another. And you shall make fifty golden clasps, and you "
123    "shall fasten the curtains to one another with the clasps; so "
124    "shall the Mishkan become one. And [then] you shall make "
125    "curtains of goat hair for a tent over the Mishkan; you shall "
126    "make eleven curtains. The length of one curtain [shall be] "
127    "thirty cubits, and the width of one curtain four cubits; the "
128    "same measure for the eleven curtains. And you shall join the "
129    "five curtains by themselves, and the [other] six curtains by "
130    "themselves; and you shall fold the sixth curtain before the "
131    "front of the tent. And you shall make fifty loops on the edge "
132    "of one curtain, [which is] at the edge of the [first] set, and "
133    "fifty loops on the edge of the [outermost] curtain of the "
134    "second set. And you shall make fifty copper clasps; you shall "
135    "bring the clasps into the loops, and you shall fasten the "
136    "tent together so that it will become one. And the overhanging "
137    "excess in the curtains of the tent half of the extra curtain "
138    "shall hang over the rear of the Mishkan. And the cubit from "
139    "here and the cubit from there of the excess in the length of "
140    "the curtains of the tent shall hang over the sides of the "
141    "Mishkan from here and from there to cover it. And you shall "
142    "make a covering for the tent of ram skins dyed red and a "
143    "covering of tachash skins above.";
144
145struct text_sequence : public std::vector<char> {
146    text_sequence()
147        {
148            const char* c = 
149                "The Lord spoke to Moses saying: Speak to the children of "
150                "Israel, and have them take for Me an offering; from every "
151                "person whose heart inspires him to generosity, you shall take "
152                "My offering. And this is the offering that you shall take "
153                "from them: gold, silver, and copper; blue, purple, and "
154                "crimson wool; linen and goat hair; ram skins dyed red, "
155                "tachash skins, and acacia wood; oil for lighting, spices for "
156                "the anointing oil and for the incense; shoham stones and "
157                "filling stones for the ephod and for the choshen. And they "
158                "shall make Me a sanctuary and I will dwell in their midst "
159                "according to all that I show you, the pattern of the Mishkan "
160                "and the pattern of all its vessels; and so shall you do. They "
161                "shall make an ark of acacia wood, two and a half cubits its "
162                "length, a cubit and a half its width, and a cubit and a half "
163                "its height. And you shall overlay it with pure gold; from "
164                "inside and from outside you shall overlay it, and you shall "
165                "make upon it a golden crown all around. And you shall cast "
166                "four golden rings for it, and you shall place them upon its "
167                "four corners, two rings on its one side, and two rings on its "
168                "other side. And you shall make poles of acacia wood and you "
169                "shall overlay them with gold. And you shall bring the poles "
170                "into the rings on the sides of the ark, to carry the ark with "
171                "them. The poles of the ark shall be in the rings; they shall "
172                "not be removed from it. And you shall place into the ark the "
173                "testimony, which I will give you. "
174                "And you shall make an ark cover of pure gold, two and a half "
175                "cubits its length and a cubit and a half its width. And you "
176                "shall make two golden cherubim; you shall make them of "
177                "hammered work, from the two ends of the ark cover. And make "
178                "one cherub from the one end and the other cherub from the "
179                "other end; from the ark cover you shall make the cherubim on "
180                "its two ends. The cherubim shall have their wings spread "
181                "upwards, shielding the ark cover with their wings, with their "
182                "faces toward one another; [turned] toward the ark cover shall "
183                "be the faces of the cherubim. And you shall place the ark "
184                "cover on the ark from above, and into the ark you shall place "
185                "the testimony, which I will give you. I will arrange My "
186                "meetings with you there, and I will speak with you from atop "
187                "the ark cover from between the two cherubim that are upon the "
188                "Ark of the Testimony, all that I will command you unto the "
189                "children of Israel. And you shall make a table of acacia "
190                "wood, two cubits its length, one cubit its width, and a cubit "
191                "and a half its height. And you shall overlay it with pure "
192                "gold, and you shall make for it a golden crown all around. "
193                "And you shall make for it a frame a handbreadth [wide] all "
194                "around, and you shall make a golden crown for its frame all "
195                "around. And you shall make for it four golden rings, and you "
196                "shall place the rings on the four corners that are on its "
197                "four legs. The rings shall be opposite the frame as holders "
198                "for the poles [with which] to carry the table. And you shall "
199                "make the poles of acacia wood, and you shall overlay them "
200                "with gold, and the table shall be carried with them. And you "
201                "shall make its forms, its spoons, its half pipes, and its "
202                "supports with which it will be covered; of pure gold you "
203                "shall make them. And you shall place on the table showbread "
204                "before Me at all times. "
205                "And you shall make a menorah of pure gold. The menorah shall "
206                "be made of hammered work; its base and its stem, its goblets, "
207                "its knobs, and its flowers shall [all] be [one piece] with "
208                "it. And six branches coming out of its sides: three menorah "
209                "branches from its one side and three menorah branches from "
210                "its second side. Three decorated goblets on one branch, a "
211                "knob and a flower, and three decorated goblets on one branch, "
212                "a knob and a flower; so for the six branches that come out of "
213                "the menorah. And on [the stem of] the menorah [shall be] four "
214                "decorated goblets, its knobs and its flowers. And a knob under "
215                "the two branches from it, and a knob under the two branches "
216                "from it, and a knob under the two branches from it; so for the "
217                "six branches that come out of the menorah. Their knobs and "
218                "their branches shall [all] be [one piece] with it; all of it "
219
220                "[shall be] one hammered mass of pure gold. And you shall make "
221                "its lamps seven, and he shall kindle its lamps [so that they] "
222                "shed light toward its face. And its tongs and its scoops "
223                "[shall be] of pure gold. He shall make it of a talent of pure "
224                "gold, with all these implements. Now see and make according "
225                "to their pattern, which you are shown on the mountain. "
226                "And the Mishkan you shall make out of ten curtains "
227                "[consisting] of twisted fine linen, and blue, purple, and "
228                "crimson wool. A cherubim design of the work of a master "
229                "weaver you shall make them. The length of one curtain [shall "
230                "be] twenty eight cubits, and the width of one curtain [shall "
231                "be] four cubits; the same measure for all the curtains. Five "
232                "of these curtains shall be joined to one another, and [the "
233                "other] five curtains shall [also] be joined to one another. "
234                "And you shall make loops of blue wool on the edge of one "
235                "curtain [that is] at the edge of the [first] set, and so "
236                "shall you do on the edge of the outermost curtain of the "
237                "second set. You shall make fifty loops on [the edge of] one "
238                "curtain, and you shall make fifty loops on the edge of the "
239                "curtain in the second set; the loops shall correspond to one "
240                "another. And you shall make fifty golden clasps, and you "
241                "shall fasten the curtains to one another with the clasps; so "
242                "shall the Mishkan become one. And [then] you shall make "
243                "curtains of goat hair for a tent over the Mishkan; you shall "
244                "make eleven curtains. The length of one curtain [shall be] "
245                "thirty cubits, and the width of one curtain four cubits; the "
246                "same measure for the eleven curtains. And you shall join the "
247                "five curtains by themselves, and the [other] six curtains by "
248                "themselves; and you shall fold the sixth curtain before the "
249                "front of the tent. And you shall make fifty loops on the edge "
250                "of one curtain, [which is] at the edge of the [first] set, and "
251                "fifty loops on the edge of the [outermost] curtain of the "
252                "second set. And you shall make fifty copper clasps; you shall "
253                "bring the clasps into the loops, and you shall fasten the "
254                "tent together so that it will become one. And the overhanging "
255                "excess in the curtains of the tent half of the extra curtain "
256                "shall hang over the rear of the Mishkan. And the cubit from "
257                "here and the cubit from there of the excess in the length of "
258                "the curtains of the tent shall hang over the sides of the "
259                "Mishkan from here and from there to cover it. And you shall "
260                "make a covering for the tent of ram skins dyed red and a "
261                "covering of tachash skins above.";
262            std::vector<char>::size_type len = strlen(c);
263            this->reserve(len);
264            this->insert(this->end(), c, c + len);
265        }
266};
267
268
269//----------------------------------------------------------------------------//
270
271} } } // End namespaces test, iostreams, boost.
272
273#endif // #ifndef BOOST_IOSTREAMS_TEST_SEQUENCE_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.