close_test.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. /*
  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. * Verifies that the close() member functions of filters and devices
  8. * are called with the correct arguments in the correct order when
  9. * used with chains and streams.
  10. *
  11. * File: libs/iostreams/test/close_test.cpp
  12. * Date: Sun Dec 09 16:12:23 MST 2007
  13. * Copyright: 2007 CodeRage
  14. * Author: Jonathan Turkanis
  15. */
  16. #include <boost/iostreams/chain.hpp>
  17. #include <boost/iostreams/filtering_streambuf.hpp>
  18. #include <boost/iostreams/stream.hpp>
  19. #include <boost/test/test_tools.hpp>
  20. #include <boost/test/unit_test.hpp>
  21. #include "detail/closable.hpp"
  22. #include "detail/operation_sequence.hpp"
  23. using namespace std;
  24. using namespace boost;
  25. using namespace boost::iostreams;
  26. using namespace boost::iostreams::test;
  27. using boost::unit_test::test_suite;
  28. namespace io = boost::iostreams;
  29. void input_chain_test()
  30. {
  31. // Test input filter and device
  32. {
  33. operation_sequence seq;
  34. filtering_streambuf<input> ch;
  35. // Test chain::pop()
  36. ch.push(closable_filter<input>(seq.new_operation(2)));
  37. ch.push(closable_device<input>(seq.new_operation(1)));
  38. BOOST_CHECK_NO_THROW(ch.pop());
  39. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  40. // Test filter reuse and io::close()
  41. seq.reset();
  42. ch.push(closable_device<input>(seq.new_operation(1)));
  43. BOOST_CHECK_NO_THROW(io::close(ch));
  44. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  45. // Test filter reuse and chain::reset()
  46. seq.reset();
  47. ch.push(closable_device<input>(seq.new_operation(1)));
  48. BOOST_CHECK_NO_THROW(ch.reset());
  49. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  50. }
  51. // Test bidirectional filter and device
  52. {
  53. operation_sequence seq;
  54. filtering_streambuf<input> ch;
  55. // Test chain::pop()
  56. ch.push(
  57. closable_filter<bidirectional>(
  58. seq.new_operation(2),
  59. seq.new_operation(3)
  60. )
  61. );
  62. ch.push(
  63. closable_device<bidirectional>(
  64. seq.new_operation(1),
  65. seq.new_operation(4)
  66. )
  67. );
  68. BOOST_CHECK_NO_THROW(ch.pop());
  69. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  70. // Test filter reuse and io::close()
  71. seq.reset();
  72. ch.push(
  73. closable_device<bidirectional>(
  74. seq.new_operation(1),
  75. seq.new_operation(4)
  76. )
  77. );
  78. BOOST_CHECK_NO_THROW(io::close(ch));
  79. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  80. // Test filter reuse and chain::reset()
  81. seq.reset();
  82. ch.push(
  83. closable_device<bidirectional>(
  84. seq.new_operation(1),
  85. seq.new_operation(4)
  86. )
  87. );
  88. BOOST_CHECK_NO_THROW(ch.reset());
  89. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  90. }
  91. // Test seekable filter and device
  92. {
  93. operation_sequence seq;
  94. filtering_streambuf<input> ch;
  95. // Test chain::pop()
  96. ch.push(closable_filter<seekable>(seq.new_operation(1)));
  97. ch.push(closable_device<seekable>(seq.new_operation(2)));
  98. BOOST_CHECK_NO_THROW(ch.pop());
  99. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  100. // Test filter reuse and io::close()
  101. seq.reset();
  102. ch.push(closable_device<seekable>(seq.new_operation(2)));
  103. BOOST_CHECK_NO_THROW(io::close(ch));
  104. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  105. // Test filter reuse and chain::reset()
  106. seq.reset();
  107. ch.push(closable_device<seekable>(seq.new_operation(2)));
  108. BOOST_CHECK_NO_THROW(ch.reset());
  109. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  110. }
  111. // Test dual-user filter
  112. {
  113. operation_sequence seq;
  114. filtering_streambuf<input> ch;
  115. operation dummy;
  116. // Test chain::pop()
  117. ch.push(
  118. closable_filter<dual_use>(
  119. seq.new_operation(2),
  120. dummy
  121. )
  122. );
  123. ch.push(closable_device<input>(seq.new_operation(1)));
  124. BOOST_CHECK_NO_THROW(ch.pop());
  125. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  126. // Test filter reuse and io::close()
  127. seq.reset();
  128. ch.push(closable_device<input>(seq.new_operation(1)));
  129. BOOST_CHECK_NO_THROW(io::close(ch));
  130. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  131. // Test filter reuse and chain::reset()
  132. seq.reset();
  133. ch.push(closable_device<input>(seq.new_operation(1)));
  134. BOOST_CHECK_NO_THROW(ch.reset());
  135. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  136. }
  137. // Test direct source
  138. {
  139. operation_sequence seq;
  140. filtering_streambuf<input> ch;
  141. // Test chain::pop()
  142. ch.push(closable_filter<input>(seq.new_operation(2)));
  143. ch.push(closable_device<direct_input>(seq.new_operation(1)));
  144. BOOST_CHECK_NO_THROW(ch.pop());
  145. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  146. // Test filter reuse and io::close()
  147. seq.reset();
  148. ch.push(closable_device<direct_input>(seq.new_operation(1)));
  149. BOOST_CHECK_NO_THROW(io::close(ch));
  150. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  151. // Test filter reuse and chain::reset()
  152. seq.reset();
  153. ch.push(closable_device<direct_input>(seq.new_operation(1)));
  154. BOOST_CHECK_NO_THROW(ch.reset());
  155. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  156. }
  157. // Test direct bidirectional device
  158. {
  159. operation_sequence seq;
  160. filtering_streambuf<input> ch;
  161. // Test chain::pop()
  162. ch.push(closable_filter<input>(seq.new_operation(2)));
  163. ch.push(
  164. closable_device<direct_bidirectional>(
  165. seq.new_operation(1),
  166. seq.new_operation(3)
  167. )
  168. );
  169. BOOST_CHECK_NO_THROW(ch.pop());
  170. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  171. // Test filter reuse and io::close()
  172. seq.reset();
  173. ch.push(
  174. closable_device<direct_bidirectional>(
  175. seq.new_operation(1),
  176. seq.new_operation(3)
  177. )
  178. );
  179. BOOST_CHECK_NO_THROW(io::close(ch));
  180. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  181. // Test filter reuse and chain::reset()
  182. seq.reset();
  183. ch.push(
  184. closable_device<direct_bidirectional>(
  185. seq.new_operation(1),
  186. seq.new_operation(3)
  187. )
  188. );
  189. BOOST_CHECK_NO_THROW(ch.reset());
  190. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  191. }
  192. // Test direct seekable device
  193. {
  194. operation_sequence seq;
  195. filtering_streambuf<input> ch;
  196. // Test chain::pop()
  197. ch.push(closable_filter<input>(seq.new_operation(1)));
  198. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  199. BOOST_CHECK_NO_THROW(ch.pop());
  200. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  201. // Test filter reuse and io::close()
  202. seq.reset();
  203. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  204. BOOST_CHECK_NO_THROW(io::close(ch));
  205. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  206. // Test filter reuse and chain::reset()
  207. seq.reset();
  208. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  209. BOOST_CHECK_NO_THROW(ch.reset());
  210. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  211. }
  212. }
  213. void output_chain_test()
  214. {
  215. // Test output filter and device
  216. {
  217. operation_sequence seq;
  218. filtering_streambuf<output> ch;
  219. // Test chain::pop()
  220. ch.push(closable_filter<output>(seq.new_operation(1)));
  221. ch.push(closable_device<output>(seq.new_operation(2)));
  222. BOOST_CHECK_NO_THROW(ch.pop());
  223. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  224. // Test filter reuse and io::close()
  225. seq.reset();
  226. ch.push(closable_device<output>(seq.new_operation(2)));
  227. BOOST_CHECK_NO_THROW(io::close(ch));
  228. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  229. // Test filter reuse and chain::reset()
  230. seq.reset();
  231. ch.push(closable_device<output>(seq.new_operation(2)));
  232. BOOST_CHECK_NO_THROW(ch.reset());
  233. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  234. }
  235. // Test bidirectional filter and device
  236. {
  237. operation_sequence seq;
  238. filtering_streambuf<output> ch;
  239. // Test chain::pop()
  240. ch.push(
  241. closable_filter<bidirectional>(
  242. seq.new_operation(2),
  243. seq.new_operation(3)
  244. )
  245. );
  246. ch.push(
  247. closable_device<bidirectional>(
  248. seq.new_operation(1),
  249. seq.new_operation(4)
  250. )
  251. );
  252. BOOST_CHECK_NO_THROW(ch.pop());
  253. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  254. // Test filter reuse and io::close()
  255. seq.reset();
  256. ch.push(
  257. closable_device<bidirectional>(
  258. seq.new_operation(1),
  259. seq.new_operation(4)
  260. )
  261. );
  262. BOOST_CHECK_NO_THROW(io::close(ch));
  263. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  264. // Test filter reuse and chain::reset()
  265. seq.reset();
  266. ch.push(
  267. closable_device<bidirectional>(
  268. seq.new_operation(1),
  269. seq.new_operation(4)
  270. )
  271. );
  272. BOOST_CHECK_NO_THROW(ch.reset());
  273. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  274. }
  275. // Test seekable filter and device
  276. {
  277. operation_sequence seq;
  278. filtering_streambuf<output> ch;
  279. // Test chain::pop()
  280. ch.push(closable_filter<seekable>(seq.new_operation(1)));
  281. ch.push(closable_device<seekable>(seq.new_operation(2)));
  282. BOOST_CHECK_NO_THROW(ch.pop());
  283. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  284. // Test filter reuse and io::close()
  285. seq.reset();
  286. ch.push(closable_device<seekable>(seq.new_operation(2)));
  287. BOOST_CHECK_NO_THROW(io::close(ch));
  288. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  289. // Test filter reuse and chain::reset()
  290. seq.reset();
  291. ch.push(closable_device<seekable>(seq.new_operation(2)));
  292. BOOST_CHECK_NO_THROW(ch.reset());
  293. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  294. }
  295. // Test dual-user filter
  296. {
  297. operation_sequence seq;
  298. filtering_streambuf<output> ch;
  299. operation dummy;
  300. // Test chain::pop()
  301. ch.push(
  302. closable_filter<dual_use>(
  303. dummy,
  304. seq.new_operation(1)
  305. )
  306. );
  307. ch.push(closable_device<output>(seq.new_operation(3)));
  308. BOOST_CHECK_NO_THROW(ch.pop());
  309. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  310. // Test filter reuse and io::close()
  311. seq.reset();
  312. ch.push(closable_device<output>(seq.new_operation(3)));
  313. BOOST_CHECK_NO_THROW(io::close(ch));
  314. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  315. // Test filter reuse and chain::reset()
  316. seq.reset();
  317. ch.push(closable_device<output>(seq.new_operation(3)));
  318. BOOST_CHECK_NO_THROW(ch.reset());
  319. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  320. }
  321. // Test direct sink
  322. {
  323. operation_sequence seq;
  324. filtering_streambuf<output> ch;
  325. // Test chain::pop()
  326. ch.push(closable_filter<output>(seq.new_operation(1)));
  327. ch.push(closable_device<direct_output>(seq.new_operation(2)));
  328. BOOST_CHECK_NO_THROW(ch.pop());
  329. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  330. // Test filter reuse and io::close()
  331. seq.reset();
  332. ch.push(closable_device<direct_output>(seq.new_operation(2)));
  333. BOOST_CHECK_NO_THROW(io::close(ch));
  334. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  335. // Test filter reuse and chain::reset()
  336. seq.reset();
  337. ch.push(closable_device<direct_output>(seq.new_operation(2)));
  338. BOOST_CHECK_NO_THROW(ch.reset());
  339. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  340. }
  341. // Test direct bidirectional device
  342. {
  343. operation_sequence seq;
  344. filtering_streambuf<output> ch;
  345. // Test chain::pop()
  346. ch.push(closable_filter<output>(seq.new_operation(2)));
  347. ch.push(
  348. closable_device<direct_bidirectional>(
  349. seq.new_operation(1),
  350. seq.new_operation(3)
  351. )
  352. );
  353. BOOST_CHECK_NO_THROW(ch.pop());
  354. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  355. // Test filter reuse and io::close()
  356. seq.reset();
  357. ch.push(
  358. closable_device<direct_bidirectional>(
  359. seq.new_operation(1),
  360. seq.new_operation(3)
  361. )
  362. );
  363. BOOST_CHECK_NO_THROW(io::close(ch));
  364. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  365. // Test filter reuse and chain::reset()
  366. seq.reset();
  367. ch.push(
  368. closable_device<direct_bidirectional>(
  369. seq.new_operation(1),
  370. seq.new_operation(3)
  371. )
  372. );
  373. BOOST_CHECK_NO_THROW(ch.reset());
  374. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  375. }
  376. // Test direct seekable device
  377. {
  378. operation_sequence seq;
  379. filtering_streambuf<output> ch;
  380. // Test chain::pop()
  381. ch.push(closable_filter<output>(seq.new_operation(1)));
  382. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  383. BOOST_CHECK_NO_THROW(ch.pop());
  384. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  385. // Test filter reuse and io::close()
  386. seq.reset();
  387. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  388. BOOST_CHECK_NO_THROW(io::close(ch));
  389. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  390. // Test filter reuse and chain::reset()
  391. seq.reset();
  392. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  393. BOOST_CHECK_NO_THROW(ch.reset());
  394. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  395. }
  396. }
  397. void bidirectional_chain_test()
  398. {
  399. // Test bidirectional filter and device
  400. {
  401. operation_sequence seq;
  402. filtering_streambuf<bidirectional> ch;
  403. // Test chain::pop()
  404. ch.push(
  405. closable_filter<bidirectional>(
  406. seq.new_operation(2),
  407. seq.new_operation(3)
  408. )
  409. );
  410. ch.push(
  411. closable_device<bidirectional>(
  412. seq.new_operation(1),
  413. seq.new_operation(4)
  414. )
  415. );
  416. BOOST_CHECK_NO_THROW(ch.pop());
  417. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  418. // Test filter reuse and io::close()
  419. seq.reset();
  420. ch.push(
  421. closable_device<bidirectional>(
  422. seq.new_operation(1),
  423. seq.new_operation(4)
  424. )
  425. );
  426. BOOST_CHECK_NO_THROW(io::close(ch));
  427. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  428. // Test filter reuse and chain::reset()
  429. seq.reset();
  430. ch.push(
  431. closable_device<bidirectional>(
  432. seq.new_operation(1),
  433. seq.new_operation(4)
  434. )
  435. );
  436. BOOST_CHECK_NO_THROW(ch.reset());
  437. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  438. }
  439. // Test direct bidirectional device
  440. {
  441. operation_sequence seq;
  442. filtering_streambuf<bidirectional> ch;
  443. // Test chain::pop()
  444. ch.push(
  445. closable_filter<bidirectional>(
  446. seq.new_operation(2),
  447. seq.new_operation(3)
  448. )
  449. );
  450. ch.push(
  451. closable_device<direct_bidirectional>(
  452. seq.new_operation(1),
  453. seq.new_operation(4)
  454. )
  455. );
  456. BOOST_CHECK_NO_THROW(ch.pop());
  457. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  458. // Test filter reuse and io::close()
  459. seq.reset();
  460. ch.push(
  461. closable_device<direct_bidirectional>(
  462. seq.new_operation(1),
  463. seq.new_operation(4)
  464. )
  465. );
  466. BOOST_CHECK_NO_THROW(io::close(ch));
  467. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  468. // Test filter reuse and chain::reset()
  469. seq.reset();
  470. ch.push(
  471. closable_device<direct_bidirectional>(
  472. seq.new_operation(1),
  473. seq.new_operation(4)
  474. )
  475. );
  476. BOOST_CHECK_NO_THROW(ch.reset());
  477. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  478. }
  479. }
  480. void seekable_chain_test()
  481. {
  482. // Test seekable filter and device
  483. {
  484. operation_sequence seq;
  485. filtering_streambuf<seekable> ch;
  486. // Test chain::pop()
  487. ch.push(closable_filter<seekable>(seq.new_operation(1)));
  488. ch.push(closable_device<seekable>(seq.new_operation(2)));
  489. BOOST_CHECK_NO_THROW(ch.pop());
  490. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  491. // Test filter reuse and io::close()
  492. seq.reset();
  493. ch.push(closable_device<seekable>(seq.new_operation(2)));
  494. BOOST_CHECK_NO_THROW(io::close(ch));
  495. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  496. // Test filter reuse and chain::reset()
  497. seq.reset();
  498. ch.push(closable_device<seekable>(seq.new_operation(2)));
  499. BOOST_CHECK_NO_THROW(ch.reset());
  500. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  501. }
  502. // Test direct seekable device
  503. {
  504. operation_sequence seq;
  505. filtering_streambuf<seekable> ch;
  506. // Test chain::pop()
  507. ch.push(closable_filter<seekable>(seq.new_operation(1)));
  508. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  509. BOOST_CHECK_NO_THROW(ch.pop());
  510. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  511. // Test filter reuse and io::close()
  512. seq.reset();
  513. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  514. BOOST_CHECK_NO_THROW(io::close(ch));
  515. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  516. // Test filter reuse and chain::reset()
  517. seq.reset();
  518. ch.push(closable_device<direct_seekable>(seq.new_operation(2)));
  519. BOOST_CHECK_NO_THROW(ch.reset());
  520. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  521. }
  522. }
  523. void stream_test()
  524. {
  525. // Test source
  526. {
  527. operation_sequence seq;
  528. stream< closable_device<input> > str;
  529. str.open(closable_device<input>(seq.new_operation(1)));
  530. BOOST_CHECK_NO_THROW(str.close());
  531. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  532. }
  533. // Test sink
  534. {
  535. operation_sequence seq;
  536. stream< closable_device<output> > str;
  537. str.open(closable_device<output>(seq.new_operation(1)));
  538. BOOST_CHECK_NO_THROW(str.close());
  539. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  540. }
  541. // Test bidirectional device
  542. {
  543. operation_sequence seq;
  544. stream< closable_device<bidirectional> > str;
  545. str.open(
  546. closable_device<bidirectional>(
  547. seq.new_operation(1),
  548. seq.new_operation(2)
  549. )
  550. );
  551. BOOST_CHECK_NO_THROW(str.close());
  552. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  553. }
  554. // Test seekable device
  555. {
  556. operation_sequence seq;
  557. stream< closable_device<seekable> > str;
  558. str.open(closable_device<seekable>(seq.new_operation(1)));
  559. BOOST_CHECK_NO_THROW(str.close());
  560. BOOST_CHECK_OPERATION_SEQUENCE(seq);
  561. }
  562. }
  563. test_suite* init_unit_test_suite(int, char* [])
  564. {
  565. test_suite* test = BOOST_TEST_SUITE("execute test");
  566. test->add(BOOST_TEST_CASE(&input_chain_test));
  567. test->add(BOOST_TEST_CASE(&output_chain_test));
  568. test->add(BOOST_TEST_CASE(&bidirectional_chain_test));
  569. test->add(BOOST_TEST_CASE(&seekable_chain_test));
  570. test->add(BOOST_TEST_CASE(&stream_test));
  571. return test;
  572. }