Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / input.output / iostream.objects / wide.stream.objects / wcerr.sh.cpp
blobae82035ccfc62b334979d3364db4c0a9cb5a7e0a
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 // <iostream>
11 // wostream wcerr;
13 // UNSUPPORTED: no-wide-characters
15 // RUN: %{build}
16 // RUN: %{exec} %t.exe 2> %t.actual
17 // RUN: echo -n 1234 > %t.expected
18 // RUN: diff %t.expected %t.actual
20 #include <iostream>
21 #include <cassert>
23 #include "test_macros.h"
25 int main(int, char**) {
26 std::wcerr << L"1234";
27 assert(std::wcerr.flags() & std::ios_base::unitbuf);
28 assert(std::wcerr.tie() == &std::wcout);
29 return 0;