Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/iostreams/test/invert_test.cpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.3 KB
Line 
1// (C) Copyright Jonathan Turkanis 2004-5.
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#include <boost/iostreams/device/file.hpp>
8#include <boost/iostreams/filter/test.hpp>
9#include <boost/iostreams/invert.hpp>
10#include <boost/test/test_tools.hpp>
11#include <boost/test/unit_test.hpp>
12#include "detail/filters.hpp"
13#include "detail/temp_file.hpp"
14
15using namespace boost::iostreams;
16using namespace boost::iostreams::test;
17using boost::unit_test::test_suite; 
18
19void inverse_test()
20{
21
22    test_file       test;
23    lowercase_file  lower;
24    uppercase_file  upper;
25
26    BOOST_CHECK( test_input_filter(
27                    invert(tolower_filter()),
28                    file_source(test.name(), in_mode),
29                    file_source(lower.name(), in_mode) ) );
30
31    BOOST_CHECK( test_output_filter(
32                    invert(toupper_filter()),
33                    file_source(test.name(), in_mode),
34                    file_source(upper.name(), in_mode) ) );
35}
36
37
38test_suite* init_unit_test_suite(int, char* []) 
39{
40    test_suite* test = BOOST_TEST_SUITE("reverse test");
41    test->add(BOOST_TEST_CASE(&inverse_test));
42    return test;
43}
Note: See TracBrowser for help on using the repository browser.