# Filter Testing Functions

Overview
Headers
Reference

Function template `test_input_filter`
Function template `test_output_filter`
Function template `test_filter_pair`

## Overview

The header `<boost/iostreams/filter/test.hpp>` provides several overloaded function templates for verifying that a filter works as expected when used in conjunction with non-Blocking Sources and Sinks.

## Headers

`<boost/iostreams/filter/test.hpp>`

## Reference

### Function template `test_input_filter`

#### Description

Verifies that the given InputFilter yields the given output when passed the given input.

#### Synopsis

    namespace boost { namespace iostreams {

    template<typename InputFilter>
    bool test_input_filter( InputFilter filter,
                            const std::string& input,
                            const std::string& output );

    template<typename InputFilter, typename Source1, typename Source2>
    bool test_input_filter( InputFilter filter,
                            const Source1& input,
                            const Source2& output );

    } } // End namespace boost::io

### Function template `test_output_filter`

#### Description

Verifies that the given OutputFilter yields the given output when passed the given input.

#### Synopsis

    namespace boost { namespace iostreams {

    template<typename OutputFilter>
    bool test_output_filter( OutputFilter filter,
                             const std::string& input,
                             const std::string& output );

    template<typename OutputFilter, typename Source1, typename Source2>
    bool test_output_filter( OutputFilter filter,
                             const Source1& input,
                             const Source2& output );

    } } // End namespace boost::io

### Function template `test_filter_pair`

#### Description

Verifies that the given data is preserved when it is passed first through a given OutputFilter and then through a given InputFilter.

#### Synopsis

    namespace boost { namespace iostreams {

    template<typename OutputFilter, typename InputFilter>
    bool test_filter_pair( OutputFilter first,
                           InputFilter second,
                           const std::string& data );

    template<typename OutputFilter, typename InputFilter, typename Source>
    bool test_filter_pair( OutputFilter first,
                           InputFilter second,
                           const Source& data );

    } } // End namespace boost::io

© Copyright 2008 CodeRage, LLC
© Copyright 2004-2007 Jonathan Turkanis

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)