]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc
Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / basic_ostream / inserters_other / char / 3.cc
1 // 1999-08-16 bkoz
2 // 1999-11-01 bkoz
3
4 // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation
5 //
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
10 // any later version.
11
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
20
21 // 27.6.2.5.4 basic_ostream character inserters
22
23 #include <ostream>
24 #include <sstream>
25 #include <testsuite_hooks.h>
26
27 // libstdc++/3272
28 void test04()
29 {
30 using namespace std;
31 bool test __attribute__((unused)) = true;
32 istringstream istr("inside betty carter");
33 ostringstream ostr;
34 ostr << istr.rdbuf() << endl;
35
36 if (ostr.rdstate() & ios_base::eofbit)
37 test = false;
38
39 VERIFY( test );
40 }
41
42 int
43 main()
44 {
45 test04();
46 return 0;
47 }