Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libstdc++-v3 / testsuite / 27_io / manipulators / standard / char / 1.cc
blob8002397884352adafb21f44dd3ec69f904a2f64d
1 // Copyright (C) 2002, 2004 Free Software Foundation, Inc.
2 //
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 2, or (at your option)
7 // any later version.
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 COPYING. If not, write to the Free
16 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 // USA.
19 // 27.6.3 - Standard manipulators
21 #include <sstream>
22 #include <iomanip>
23 #include <testsuite_hooks.h>
25 void
26 test01()
28 using namespace std;
29 bool test __attribute__((unused)) = true;
31 string s("john coltrane, a love supreme");
32 istringstream iss(s);
33 ostringstream oss;
35 // resetiosflags
36 resetiosflags(ios_base::boolalpha);
37 iss >> resetiosflags(ios_base::boolalpha);
38 VERIFY(iss.good());
39 oss << resetiosflags(ios_base::boolalpha);
40 VERIFY(oss.good());
42 // setiosflags
43 setiosflags(ios_base::skipws);
44 iss >> setiosflags(ios_base::skipws);
45 VERIFY(iss.good());
46 oss << setiosflags(ios_base::skipws);
47 VERIFY(oss.good());
49 // setbase
50 setbase(8);
51 iss >> setbase(8);
52 VERIFY(iss.good());
53 oss << setbase(8);
54 VERIFY(oss.good());
56 // setfil
57 setfill('a');
58 iss >> setfill('a');
59 VERIFY(iss.good());
60 oss << setfill('a');
61 VERIFY(oss.good());
63 // setprecision
64 setprecision(4);
65 iss >> setprecision(4);
66 VERIFY(iss.good());
67 oss << setprecision(4);
68 VERIFY(oss.good());
70 // setprecision
71 setw(7);
72 iss >> setw(7);
73 VERIFY(iss.good());
74 oss << setw(7);
75 VERIFY(oss.good());
78 int
79 main()
81 test01();
82 return 0;