1 // Copyright (C) 2004-2013 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
18 // 27.7.2.2 member functions (istringstream_members)
21 #include <testsuite_hooks.h>
25 bool test __attribute__((unused)) = true;
26 std::wistringstream is01;
27 const std::wstring str00;
28 const std::wstring str01 = L"123";
33 std::ios_base::iostate state1, state2, stateeof;
34 stateeof = std::ios_base::eofbit;
38 VERIFY( str00 == str02 );
40 // void str(const basic_string&)
43 VERIFY( str01 == str02 );
44 state1 = is01.rdstate();
46 state2 = is01.rdstate();
48 // 22.2.2.1.2 num_get virtual functions
50 // in any case, if stage 2 processing was terminated by the test for
51 // in == end then err != ios_base::eofbit is performed.
52 VERIFY( state1 != state2 );
53 VERIFY( state2 == stateeof );
58 // as is01.good() is false, istream::sentry blocks extraction.
61 state1 = is01.rdstate();
63 state2 = is01.rdstate();
65 VERIFY( state1 != state2 );
66 VERIFY( state2 == stateeof );