Initial import from FreeBSD RELENG_4:
[games.git] / contrib / libio / tests / tiomanip.cc
1 // test the parametrized manipulators
2
3 #include <stdlib.h>
4 #include <iomanip.h>
5
6 main()
7 {
8 #ifdef _G_NO_TEMPLATES
9     cerr << "(IO manipulators are not supported with this compiler)\n");
10     exit(-1);
11 #else
12
13     cout << dec  << 1234 << ' '
14          << hex  << 1234 << ' '
15          << oct  << 1234 << endl;
16
17     //SMANIP<int> x = setw(4);
18     //operator<<(cout, x);
19
20     cout
21       << "("
22       << dec << setw(4) << setfill('*') 
23       << 12 << ")\n";
24     
25     cout << "(" << 12 << ")\n";
26
27     cout << setiosflags(ios::internal);
28     cout << "(" << setw(6) << -12 << ")\n";
29
30     exit(0);
31 #endif
32 }
33
34
35