| 1 |
// 2000-08-02 bkoz |
| 2 |
|
| 3 |
// Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 4 |
// |
| 5 |
// This file is part of the GNU ISO C++ Library. This library is free |
| 6 |
// software; you can redistribute it and/or modify it under the |
| 7 |
// terms of the GNU General Public License as published by the |
| 8 |
// Free Software Foundation; either version 3, or (at your option) |
| 9 |
// any later version. |
| 10 |
|
| 11 |
// This library is distributed in the hope that it will be useful, |
| 12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
// GNU General Public License for more details. |
| 15 |
|
| 16 |
// You should have received a copy of the GNU General Public License along |
| 17 |
// with this library; see the file COPYING3. If not see |
| 18 |
// <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
// Include all the headers except for iostream. |
| 21 |
#include <algorithm> |
| 22 |
#include <bitset> |
| 23 |
#include <complex> |
| 24 |
#include <deque> |
| 25 |
#include <exception> |
| 26 |
#include <fstream> |
| 27 |
#include <functional> |
| 28 |
#include <iomanip> |
| 29 |
#include <ios> |
| 30 |
#include <iosfwd> |
| 31 |
#include <istream> |
| 32 |
#include <iterator> |
| 33 |
#include <limits> |
| 34 |
#include <list> |
| 35 |
#include <locale> |
| 36 |
#include <map> |
| 37 |
#include <memory> |
| 38 |
#include <new> |
| 39 |
#include <numeric> |
| 40 |
#include <ostream> |
| 41 |
#include <queue> |
| 42 |
#include <set> |
| 43 |
#include <sstream> |
| 44 |
#include <stack> |
| 45 |
#include <stdexcept> |
| 46 |
#include <streambuf> |
| 47 |
#include <string> |
| 48 |
#include <typeinfo> |
| 49 |
#include <utility> |
| 50 |
#include <valarray> |
| 51 |
#include <vector> |
| 52 |
#include <cassert> |
| 53 |
#include <cctype> |
| 54 |
#include <cerrno> |
| 55 |
#include <cfloat> |
| 56 |
#include <climits> |
| 57 |
#include <clocale> |
| 58 |
#include <cmath> |
| 59 |
#include <csetjmp> |
| 60 |
#include <csignal> |
| 61 |
#include <cstdarg> |
| 62 |
#include <cstddef> |
| 63 |
#include <cstdio> |
| 64 |
#include <cstdlib> |
| 65 |
#include <cstring> |
| 66 |
#include <ctime> |
| 67 |
#include <testsuite_hooks.h> |
| 68 |
|
| 69 |
// Include iostream last, just to make is as difficult as possible to |
| 70 |
// properly initialize the standard iostream objects. |
| 71 |
#include <iostream> |
| 72 |
|
| 73 |
// Make sure all the standard streams are defined. |
| 74 |
void test01() |
| 75 |
{ |
| 76 |
char array1[20]; |
| 77 |
typedef std::ios::traits_type ctraits_type; |
| 78 |
ctraits_type::int_type i = 15; |
| 79 |
ctraits_type::copy(array1, "testing istream", i); |
| 80 |
array1[i] = '\0'; |
| 81 |
std::cout << "testing cout" << std::endl; |
| 82 |
std::cerr << "testing cerr" << std::endl; |
| 83 |
VERIFY( std::cerr.flags() & std::ios_base::unitbuf ); |
| 84 |
std::clog << "testing clog" << std::endl; |
| 85 |
// std::cin >> array1; // requires somebody to type something in. |
| 86 |
VERIFY( std::cin.tie() == &std::cout ); |
| 87 |
} |
| 88 |
|
| 89 |
int |
| 90 |
main() |
| 91 |
{ |
| 92 |
test01(); |
| 93 |
return 0; |
| 94 |
} |