1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <HTML> |
---|
3 | <HEAD> |
---|
4 | <TITLE>Array Devices</TITLE> |
---|
5 | <LINK REL="stylesheet" HREF="../../../../boost.css"> |
---|
6 | <LINK REL="stylesheet" HREF="../theme/iostreams.css"> |
---|
7 | </HEAD> |
---|
8 | <BODY> |
---|
9 | |
---|
10 | <!-- Begin Banner --> |
---|
11 | |
---|
12 | <H1 CLASS="title">Filter Testing Functions</H1> |
---|
13 | <HR CLASS="banner"> |
---|
14 | |
---|
15 | <!-- End Banner --> |
---|
16 | |
---|
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> |
---|
21 | <DL> |
---|
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> |
---|
25 | </DL> |
---|
26 | </DT> |
---|
27 | </DL> |
---|
28 | |
---|
29 | <HR> |
---|
30 | |
---|
31 | <A NAME="overview"></A> |
---|
32 | <H2>Overview</H2> |
---|
33 | |
---|
34 | <P> |
---|
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>. |
---|
36 | </P> |
---|
37 | |
---|
38 | <A NAME="headers"></A> |
---|
39 | <H2>Headers</H2> |
---|
40 | |
---|
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> |
---|
43 | </DL> |
---|
44 | |
---|
45 | <A NAME="reference"></A> |
---|
46 | <H2>Reference</H2> |
---|
47 | |
---|
48 | <A NAME="test_input"></A> |
---|
49 | <H3>Function template <CODE>test_input_filter</CODE></H3> |
---|
50 | |
---|
51 | <H4>Description</H4> |
---|
52 | |
---|
53 | <P>Verifies that the given <A HREF='../concepts/input_filter.html'>InputFilter</A> yields the given output when passed the given input.</P> |
---|
54 | |
---|
55 | <H4>Synopsis</H4> |
---|
56 | |
---|
57 | <PRE CLASS="broken_ie"><SPAN CLASS="keyword">namespace</SPAN> boost { <SPAN CLASS="keyword">namespace</SPAN> iostreams { |
---|
58 | |
---|
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 ); |
---|
63 | |
---|
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 ); |
---|
68 | |
---|
69 | } } <SPAN CLASS='comment'>// End namespace boost::io</SPAN></PRE> |
---|
70 | |
---|
71 | |
---|
72 | <A NAME="test_output"></A> |
---|
73 | <H3>Function template <CODE>test_output_filter</CODE></H3> |
---|
74 | |
---|
75 | <H4>Description</H4> |
---|
76 | |
---|
77 | <P>Verifies that the given <A HREF='../concepts/output_filter.html'>OutputFilter</A> yields the given output when passed the given input.</P> |
---|
78 | |
---|
79 | <H4>Synopsis</H4> |
---|
80 | |
---|
81 | <PRE CLASS="broken_ie"><SPAN CLASS="keyword">namespace</SPAN> boost { <SPAN CLASS="keyword">namespace</SPAN> iostreams { |
---|
82 | |
---|
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 ); |
---|
87 | |
---|
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 ); |
---|
92 | |
---|
93 | } } <SPAN CLASS='comment'>// End namespace boost::io</SPAN></PRE> |
---|
94 | |
---|
95 | <A NAME="test_pair"></A> |
---|
96 | <H3>Function template <CODE>test_filter_pair</CODE></H3> |
---|
97 | |
---|
98 | <H4>Description</H4> |
---|
99 | |
---|
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> |
---|
101 | |
---|
102 | <H4>Synopsis</H4> |
---|
103 | |
---|
104 | <PRE CLASS="broken_ie"><SPAN CLASS="keyword">namespace</SPAN> boost { <SPAN CLASS="keyword">namespace</SPAN> iostreams { |
---|
105 | |
---|
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, |
---|
108 | InputFilter second, |
---|
109 | <SPAN CLASS='keyword'>const</SPAN> std::string& data ); |
---|
110 | |
---|
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, |
---|
113 | InputFilter second, |
---|
114 | <SPAN CLASS='keyword'>const</SPAN> Source& data ); |
---|
115 | |
---|
116 | } } <SPAN CLASS='comment'>// End namespace boost::io</SPAN></PRE> |
---|
117 | |
---|
118 | <!-- Begin Footer --> |
---|
119 | |
---|
120 | <HR> |
---|
121 | <P CLASS="copyright">Revised |
---|
122 | <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> |
---|
123 | 20 May, 2004 |
---|
124 | <!--webbot bot="Timestamp" endspan i-checksum="38504" --> |
---|
125 | </P> |
---|
126 | |
---|
127 | <P CLASS="copyright">© Copyright <A HREF="http://www.kangaroologic.com" TARGET="_top">Jonathan Turkanis</A>, 2004</P> |
---|
128 | <P CLASS="copyright"> |
---|
129 | 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>) |
---|
130 | </P> |
---|
131 | |
---|
132 | <!-- End Footer --> |
---|
133 | |
---|
134 | </BODY> |
---|