sequence.hpp 17 KB

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