1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
4 <TITLE>Filter Testing Functions
</TITLE>
5 <LINK REL=
"stylesheet" HREF=
"../../../../boost.css">
6 <LINK REL=
"stylesheet" HREF=
"../theme/iostreams.css">
12 <H1 CLASS=
"title">Filter Testing Functions
</H1>
17 <DL class=
"page-index">
18 <DT><A href=
"#overview">Overview
</A></DT>
19 <DT><A href=
"#headers">Headers
</A></DT>
20 <DT><A href=
"#reference">Reference
</A>
22 <DT><A href=
"#test_input">Function template
<CODE>test_input_filter
</CODE></A></DT>
23 <DT><A href=
"#test_output">Function template
<CODE>test_output_filter
</CODE></A></DT>
24 <DT><A href=
"#test_pair">Function template
<CODE>test_filter_pair
</CODE></A></DT>
31 <A NAME=
"overview"></A>
35 The header
<A CLASS=
"header" HREF=
"../../../../boost/iostreams/filter/test.hpp"><CODE><boost/iostreams/filter/test.hpp
></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>.
38 <A NAME=
"headers"></A>
41 <DL class=
"page-index">
42 <DT><A CLASS=
"header" HREF=
"../../../../boost/iostreams/filter/test.hpp"><CODE><boost/iostreams/filter/test.hpp
></CODE></A></DT>
45 <A NAME=
"reference"></A>
48 <A NAME=
"test_input"></A>
49 <H3>Function template
<CODE>test_input_filter
</CODE></H3>
53 <P>Verifies that the given
<A HREF='../concepts/input_filter.html'
>InputFilter
</A> yields the given output when passed the given input.
</P>
57 <PRE CLASS=
"broken_ie"><SPAN CLASS=
"keyword">namespace
</SPAN> boost {
<SPAN CLASS=
"keyword">namespace
</SPAN> iostreams {
59 <SPAN CLASS='keyword'
>template
</SPAN><<SPAN CLASS='keyword'
>typename
</SPAN> InputFilter
>
60 <SPAN CLASS='keyword'
>bool
</SPAN> test_input_filter( InputFilter filter,
61 <SPAN CLASS='keyword'
>const
</SPAN> std::string
& input,
62 <SPAN CLASS='keyword'
>const
</SPAN> std::string
& output );
64 <SPAN CLASS='keyword'
>template
</SPAN><<SPAN CLASS='keyword'
>typename
</SPAN> InputFilter,
<SPAN CLASS='keyword'
>typename
</SPAN> Source1,
<SPAN CLASS='keyword'
>typename
</SPAN> Source2
>
65 <SPAN CLASS='keyword'
>bool
</SPAN> test_input_filter( InputFilter filter,
66 <SPAN CLASS='keyword'
>const
</SPAN> Source1
& input,
67 <SPAN CLASS='keyword'
>const
</SPAN> Source2
& output );
69 } }
<SPAN CLASS='comment'
>// End namespace boost::io
</SPAN></PRE>
72 <A NAME=
"test_output"></A>
73 <H3>Function template
<CODE>test_output_filter
</CODE></H3>
77 <P>Verifies that the given
<A HREF='../concepts/output_filter.html'
>OutputFilter
</A> yields the given output when passed the given input.
</P>
81 <PRE CLASS=
"broken_ie"><SPAN CLASS=
"keyword">namespace
</SPAN> boost {
<SPAN CLASS=
"keyword">namespace
</SPAN> iostreams {
83 <SPAN CLASS='keyword'
>template
</SPAN><<SPAN CLASS='keyword'
>typename
</SPAN> OutputFilter
>
84 <SPAN CLASS='keyword'
>bool
</SPAN> test_output_filter( OutputFilter filter,
85 <SPAN CLASS='keyword'
>const
</SPAN> std::string
& input,
86 <SPAN CLASS='keyword'
>const
</SPAN> std::string
& output );
88 <SPAN CLASS='keyword'
>template
</SPAN><<SPAN CLASS='keyword'
>typename
</SPAN> OutputFilter,
<SPAN CLASS='keyword'
>typename
</SPAN> Source1,
<SPAN CLASS='keyword'
>typename
</SPAN> Source2
>
89 <SPAN CLASS='keyword'
>bool
</SPAN> test_output_filter( OutputFilter filter,
90 <SPAN CLASS='keyword'
>const
</SPAN> Source1
& input,
91 <SPAN CLASS='keyword'
>const
</SPAN> Source2
& output );
93 } }
<SPAN CLASS='comment'
>// End namespace boost::io
</SPAN></PRE>
95 <A NAME=
"test_pair"></A>
96 <H3>Function template
<CODE>test_filter_pair
</CODE></H3>
100 <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>
104 <PRE CLASS=
"broken_ie"><SPAN CLASS=
"keyword">namespace
</SPAN> boost {
<SPAN CLASS=
"keyword">namespace
</SPAN> iostreams {
106 <SPAN CLASS='keyword'
>template
</SPAN><<SPAN CLASS='keyword'
>typename
</SPAN> OutputFilter,
<SPAN CLASS='keyword'
>typename
</SPAN> InputFilter
>
107 <SPAN CLASS='keyword'
>bool
</SPAN> test_filter_pair( OutputFilter first,
109 <SPAN CLASS='keyword'
>const
</SPAN> std::string
& data );
111 <SPAN CLASS='keyword'
>template
</SPAN><<SPAN CLASS='keyword'
>typename
</SPAN> OutputFilter,
<SPAN CLASS='keyword'
>typename
</SPAN> InputFilter,
<SPAN CLASS='keyword'
>typename
</SPAN> Source
>
112 <SPAN CLASS='keyword'
>bool
</SPAN> test_filter_pair( OutputFilter first,
114 <SPAN CLASS='keyword'
>const
</SPAN> Source
& data );
116 } }
<SPAN CLASS='comment'
>// End namespace boost::io
</SPAN></PRE>
118 <!-- Begin Footer -->
122 <P CLASS=
"copyright">© Copyright
2008 <a href=
"http://www.coderage.com/" target=
"_top">CodeRage, LLC
</a><br/>© Copyright
2004-
2007 <a href=
"http://www.coderage.com/turkanis/" target=
"_top">Jonathan Turkanis
</a></P>
123 <P CLASS=
"copyright">
124 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>)