[VPlan] Add incoming values for all predecessor to ResumePHI (NFCI).
[llvm-project.git] / libcxx / test / std / input.output / iostream.forward / iosfwd.pass.cpp
blob1a28a5985a0112292fbccb74de1b64240eecd317
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <iosfwd>
11 #include <iosfwd>
13 #include "test_macros.h"
15 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
16 # include <cwchar>
17 #endif
19 template <class Ptr> void test()
21 Ptr p = 0;
22 ((void)p); // Prevent unused warning
25 int main(int, char**)
27 test<std::char_traits<char>* >();
28 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
29 test<std::char_traits<wchar_t>* >();
30 #endif
32 test<std::basic_ios<char>* >();
33 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
34 test<std::basic_ios<wchar_t>* >();
35 #endif
36 test<std::basic_ios<unsigned short>*>();
38 test<std::basic_streambuf<char>* >();
39 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
40 test<std::basic_streambuf<wchar_t>* >();
41 #endif
42 test<std::basic_streambuf<unsigned short>*>();
44 test<std::basic_istream<char>* >();
45 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
46 test<std::basic_istream<wchar_t>* >();
47 #endif
48 test<std::basic_istream<unsigned short>*>();
50 test<std::basic_ostream<char>* >();
51 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
52 test<std::basic_ostream<wchar_t>* >();
53 #endif
54 test<std::basic_ostream<unsigned short>*>();
56 test<std::basic_iostream<char>* >();
57 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
58 test<std::basic_iostream<wchar_t>* >();
59 #endif
60 test<std::basic_iostream<unsigned short>*>();
62 test<std::basic_stringbuf<char>* >();
63 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
64 test<std::basic_stringbuf<wchar_t>* >();
65 #endif
66 test<std::basic_stringbuf<unsigned short>*>();
68 test<std::basic_istringstream<char>* >();
69 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
70 test<std::basic_istringstream<wchar_t>* >();
71 #endif
72 test<std::basic_istringstream<unsigned short>*>();
74 test<std::basic_ostringstream<char>* >();
75 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
76 test<std::basic_ostringstream<wchar_t>* >();
77 #endif
78 test<std::basic_ostringstream<unsigned short>*>();
80 test<std::basic_stringstream<char>* >();
81 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
82 test<std::basic_stringstream<wchar_t>* >();
83 #endif
84 test<std::basic_stringstream<unsigned short>*>();
86 test<std::basic_filebuf<char>* >();
87 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
88 test<std::basic_filebuf<wchar_t>* >();
89 #endif
90 test<std::basic_filebuf<unsigned short>*>();
92 test<std::basic_ifstream<char>* >();
93 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
94 test<std::basic_ifstream<wchar_t>* >();
95 #endif
96 test<std::basic_ifstream<unsigned short>*>();
98 test<std::basic_ofstream<char>* >();
99 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
100 test<std::basic_ofstream<wchar_t>* >();
101 #endif
102 test<std::basic_ofstream<unsigned short>*>();
104 test<std::basic_fstream<char>* >();
105 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
106 test<std::basic_fstream<wchar_t>* >();
107 #endif
108 test<std::basic_fstream<unsigned short>*>();
110 test<std::istreambuf_iterator<char>* >();
111 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
112 test<std::istreambuf_iterator<wchar_t>* >();
113 #endif
114 test<std::istreambuf_iterator<unsigned short>*>();
116 test<std::ostreambuf_iterator<char>* >();
117 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
118 test<std::ostreambuf_iterator<wchar_t>* >();
119 #endif
120 test<std::ostreambuf_iterator<unsigned short>*>();
122 test<std::ios* >();
123 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
124 test<std::wios*>();
125 #endif
127 test<std::streambuf*>();
128 test<std::istream* >();
129 test<std::ostream* >();
130 test<std::iostream* >();
132 test<std::stringbuf* >();
133 test<std::istringstream*>();
134 test<std::ostringstream*>();
135 test<std::stringstream* >();
137 test<std::filebuf* >();
138 test<std::ifstream*>();
139 test<std::ofstream*>();
140 test<std::fstream* >();
142 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
143 test<std::wstreambuf*>();
144 test<std::wistream* >();
145 test<std::wostream* >();
146 test<std::wiostream* >();
148 test<std::wstringbuf* >();
149 test<std::wistringstream*>();
150 test<std::wostringstream*>();
151 test<std::wstringstream* >();
153 test<std::wfilebuf* >();
154 test<std::wifstream*>();
155 test<std::wofstream*>();
156 test<std::wfstream* >();
157 #endif
159 test<std::fpos<std::mbstate_t>*>();
160 test<std::streampos* >();
161 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
162 test<std::wstreampos* >();
163 #endif
165 return 0;