Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/iostreams/test/seek_test.hpp @ 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
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#ifndef BOOST_IOSTREAMS_TEST_SEEK_HPP_INCLUDED
8#define BOOST_IOSTREAMS_TEST_SEEK_HPP_INCLUDED
9
10#include <string>
11#include <boost/iostreams/filtering_stream.hpp>
12#include <boost/range/iterator_range.hpp>
13#include <boost/test/test_tools.hpp>
14#include "detail/verification.hpp"
15
16void seek_test()
17{
18    using namespace std;
19    using namespace boost;
20    using namespace boost::iostreams;
21    using namespace boost::iostreams::test;
22
23    {
24        string                      test(data_reps * data_length(), '\0');
25        filtering_stream<seekable>  io(make_iterator_range(test));
26        BOOST_CHECK_MESSAGE(
27            test_seekable_in_chars(io),
28            "failed seeking within a filtering_stream<seekable>, in chars"
29        );
30    }
31
32    {
33        string                      test(data_reps * data_length(), '\0');
34        filtering_stream<seekable>  io(make_iterator_range(test));
35        BOOST_CHECK_MESSAGE(
36            test_seekable_in_chunks(io),
37            "failed seeking within a filtering_stream<seekable>, in chunks"
38        );
39    }
40}
41
42#endif // #ifndef BOOST_IOSTREAMS_TEST_SEEK_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.