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 |
---|
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 <string> |
---|
8 | #include <boost/iostreams/filter/bzip2.hpp> |
---|
9 | #include <boost/iostreams/filter/test.hpp> |
---|
10 | #include <boost/test/test_tools.hpp> |
---|
11 | #include <boost/test/unit_test.hpp> |
---|
12 | #include "detail/sequence.hpp" |
---|
13 | |
---|
14 | using namespace std; |
---|
15 | using namespace boost; |
---|
16 | using namespace boost::iostreams; |
---|
17 | using namespace boost::iostreams::test; |
---|
18 | using boost::unit_test::test_suite; |
---|
19 | |
---|
20 | struct bzip2_alloc : std::allocator<char> { }; |
---|
21 | |
---|
22 | void bzip2_test() |
---|
23 | { |
---|
24 | text_sequence data; |
---|
25 | BOOST_CHECK( |
---|
26 | test_filter_pair( bzip2_compressor(), |
---|
27 | bzip2_decompressor(), |
---|
28 | std::string(data.begin(), data.end()) ) |
---|
29 | ); |
---|
30 | BOOST_CHECK( |
---|
31 | test_filter_pair( basic_bzip2_compressor<bzip2_alloc>(), |
---|
32 | basic_bzip2_decompressor<bzip2_alloc>(), |
---|
33 | std::string(data.begin(), data.end()) ) |
---|
34 | ); |
---|
35 | } |
---|
36 | |
---|
37 | test_suite* init_unit_test_suite(int, char* []) |
---|
38 | { |
---|
39 | test_suite* test = BOOST_TEST_SUITE("bzip2 test"); |
---|
40 | test->add(BOOST_TEST_CASE(&bzip2_test)); |
---|
41 | return test; |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.