pubseekoff.pass.cpp revision b64f8b07c104c6cc986570ac8ee0ed16a9f23976
1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <streambuf>
11
12// template <class charT, class traits = char_traits<charT> >
13// class basic_streambuf;
14
15// pos_type pubseekoff(off_type off, ios_base::seekdir way,
16//                     ios_base::openmode which = ios_base::in | ios_base::out);
17
18#include <streambuf>
19#include <cassert>
20
21template <class CharT>
22struct test
23    : public std::basic_streambuf<CharT>
24{
25    test() {}
26};
27
28int main()
29{
30    {
31        test<char> t;
32        assert(t.pubseekoff(0, std::ios_base::beg) == -1);
33        assert(t.pubseekoff(0, std::ios_base::beg, std::ios_base::app) == -1);
34    }
35}
36