filter_test.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Filter Testing Functions</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../../boost.css">
  6. <LINK REL="stylesheet" HREF="../theme/iostreams.css">
  7. </HEAD>
  8. <BODY>
  9. <!-- Begin Banner -->
  10. <H1 CLASS="title">Filter Testing Functions</H1>
  11. <HR CLASS="banner">
  12. <!-- End Banner -->
  13. <DL class="page-index">
  14. <DT><A href="#overview">Overview</A></DT>
  15. <DT><A href="#headers">Headers</A></DT>
  16. <DT><A href="#reference">Reference</A>
  17. <DL>
  18. <DT><A href="#test_input">Function template <CODE>test_input_filter</CODE></A></DT>
  19. <DT><A href="#test_output">Function template <CODE>test_output_filter</CODE></A></DT>
  20. <DT><A href="#test_pair">Function template <CODE>test_filter_pair</CODE></A></DT>
  21. </DL>
  22. </DT>
  23. </DL>
  24. <HR>
  25. <A NAME="overview"></A>
  26. <H2>Overview</H2>
  27. <P>
  28. The header <A CLASS="header" HREF="../../../../boost/iostreams/filter/test.hpp"><CODE>&lt;boost/iostreams/filter/test.hpp&gt;</CODE></A> provides several overloaded function templates for verifying that a filter works as expected when used in conjunction with non-<A HREF='../concepts/blocking.html'>Blocking</A> <A HREF='../concepts/source.html'>Sources</A> and <A HREF='../concepts/sink.html'>Sinks</A>.
  29. </P>
  30. <A NAME="headers"></A>
  31. <H2>Headers</H2>
  32. <DL class="page-index">
  33. <DT><A CLASS="header" HREF="../../../../boost/iostreams/filter/test.hpp"><CODE>&lt;boost/iostreams/filter/test.hpp&gt;</CODE></A></DT>
  34. </DL>
  35. <A NAME="reference"></A>
  36. <H2>Reference</H2>
  37. <A NAME="test_input"></A>
  38. <H3>Function template <CODE>test_input_filter</CODE></H3>
  39. <H4>Description</H4>
  40. <P>Verifies that the given <A HREF='../concepts/input_filter.html'>InputFilter</A> yields the given output when passed the given input.</P>
  41. <H4>Synopsis</H4>
  42. <PRE CLASS="broken_ie"><SPAN CLASS="keyword">namespace</SPAN> boost { <SPAN CLASS="keyword">namespace</SPAN> iostreams {
  43. <SPAN CLASS='keyword'>template</SPAN>&lt;<SPAN CLASS='keyword'>typename</SPAN> InputFilter&gt;
  44. <SPAN CLASS='keyword'>bool</SPAN> test_input_filter( InputFilter filter,
  45. <SPAN CLASS='keyword'>const</SPAN> std::string&amp; input,
  46. <SPAN CLASS='keyword'>const</SPAN> std::string&amp; output );
  47. <SPAN CLASS='keyword'>template</SPAN>&lt;<SPAN CLASS='keyword'>typename</SPAN> InputFilter, <SPAN CLASS='keyword'>typename</SPAN> Source1, <SPAN CLASS='keyword'>typename</SPAN> Source2&gt;
  48. <SPAN CLASS='keyword'>bool</SPAN> test_input_filter( InputFilter filter,
  49. <SPAN CLASS='keyword'>const</SPAN> Source1&amp; input,
  50. <SPAN CLASS='keyword'>const</SPAN> Source2&amp; output );
  51. } } <SPAN CLASS='comment'>// End namespace boost::io</SPAN></PRE>
  52. <A NAME="test_output"></A>
  53. <H3>Function template <CODE>test_output_filter</CODE></H3>
  54. <H4>Description</H4>
  55. <P>Verifies that the given <A HREF='../concepts/output_filter.html'>OutputFilter</A> yields the given output when passed the given input.</P>
  56. <H4>Synopsis</H4>
  57. <PRE CLASS="broken_ie"><SPAN CLASS="keyword">namespace</SPAN> boost { <SPAN CLASS="keyword">namespace</SPAN> iostreams {
  58. <SPAN CLASS='keyword'>template</SPAN>&lt;<SPAN CLASS='keyword'>typename</SPAN> OutputFilter&gt;
  59. <SPAN CLASS='keyword'>bool</SPAN> test_output_filter( OutputFilter filter,
  60. <SPAN CLASS='keyword'>const</SPAN> std::string&amp; input,
  61. <SPAN CLASS='keyword'>const</SPAN> std::string&amp; output );
  62. <SPAN CLASS='keyword'>template</SPAN>&lt;<SPAN CLASS='keyword'>typename</SPAN> OutputFilter, <SPAN CLASS='keyword'>typename</SPAN> Source1, <SPAN CLASS='keyword'>typename</SPAN> Source2&gt;
  63. <SPAN CLASS='keyword'>bool</SPAN> test_output_filter( OutputFilter filter,
  64. <SPAN CLASS='keyword'>const</SPAN> Source1&amp; input,
  65. <SPAN CLASS='keyword'>const</SPAN> Source2&amp; output );
  66. } } <SPAN CLASS='comment'>// End namespace boost::io</SPAN></PRE>
  67. <A NAME="test_pair"></A>
  68. <H3>Function template <CODE>test_filter_pair</CODE></H3>
  69. <H4>Description</H4>
  70. <P>Verifies that the given data is preserved when it is passed first through a given <A HREF='../concepts/output_filter.html'>OutputFilter</A> and then through a given <A HREF='../concepts/input_filter.html'>InputFilter</A>.</P>
  71. <H4>Synopsis</H4>
  72. <PRE CLASS="broken_ie"><SPAN CLASS="keyword">namespace</SPAN> boost { <SPAN CLASS="keyword">namespace</SPAN> iostreams {
  73. <SPAN CLASS='keyword'>template</SPAN>&lt;<SPAN CLASS='keyword'>typename</SPAN> OutputFilter, <SPAN CLASS='keyword'>typename</SPAN> InputFilter&gt;
  74. <SPAN CLASS='keyword'>bool</SPAN> test_filter_pair( OutputFilter first,
  75. InputFilter second,
  76. <SPAN CLASS='keyword'>const</SPAN> std::string&amp; data );
  77. <SPAN CLASS='keyword'>template</SPAN>&lt;<SPAN CLASS='keyword'>typename</SPAN> OutputFilter, <SPAN CLASS='keyword'>typename</SPAN> InputFilter, <SPAN CLASS='keyword'>typename</SPAN> Source&gt;
  78. <SPAN CLASS='keyword'>bool</SPAN> test_filter_pair( OutputFilter first,
  79. InputFilter second,
  80. <SPAN CLASS='keyword'>const</SPAN> Source&amp; data );
  81. } } <SPAN CLASS='comment'>// End namespace boost::io</SPAN></PRE>
  82. <!-- Begin Footer -->
  83. <HR>
  84. <P CLASS="copyright">&copy; Copyright 2008 <a href="http://www.coderage.com/" target="_top">CodeRage, LLC</a><br/>&copy; Copyright 2004-2007 <a href="https://www.boost.org/users/people/jonathan_turkanis.html" target="_top">Jonathan Turkanis</a></P>
  85. <P CLASS="copyright">
  86. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <A HREF="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)
  87. </P>
  88. <!-- End Footer -->
  89. </BODY>