[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / libcxx / test / std / input.output / iostream.format / std.manip / resetiosflags.pass.cpp
blob1603d9fb6253366d5c6cf0dcb806d68e6b1bb883
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 // <iomanip>
11 // T1 resetiosflags(ios_base::fmtflags mask);
13 #include <iomanip>
14 #include <istream>
15 #include <ostream>
16 #include <cassert>
18 #include "test_macros.h"
20 template <class CharT>
21 struct testbuf
22 : public std::basic_streambuf<CharT>
24 testbuf() {}
27 int main(int, char**)
30 testbuf<char> sb;
31 std::istream is(&sb);
32 assert(is.flags() & std::ios_base::skipws);
33 is >> std::resetiosflags(std::ios_base::skipws);
34 assert(!(is.flags() & std::ios_base::skipws));
37 testbuf<char> sb;
38 std::ostream os(&sb);
39 assert(os.flags() & std::ios_base::skipws);
40 os << std::resetiosflags(std::ios_base::skipws);
41 assert(!(os.flags() & std::ios_base::skipws));
44 testbuf<wchar_t> sb;
45 std::wistream is(&sb);
46 assert(is.flags() & std::ios_base::skipws);
47 is >> std::resetiosflags(std::ios_base::skipws);
48 assert(!(is.flags() & std::ios_base::skipws));
51 testbuf<wchar_t> sb;
52 std::wostream os(&sb);
53 assert(os.flags() & std::ios_base::skipws);
54 os << std::resetiosflags(std::ios_base::skipws);
55 assert(!(os.flags() & std::ios_base::skipws));
58 return 0;