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 //===----------------------------------------------------------------------===// 8 9 // <iostream> 10 11 // istream wcerr; 12 13 // FILE_DEPENDENCIES: ../check-stderr.sh 14 // RUN: %{build} 15 // RUN: %{exec} bash check-stderr.sh "%t.exe" "1234" 16 17 #include <iostream> 18 #include <cassert> 19 20 #include "test_macros.h" 21 main(int,char **)22int main(int, char**) { 23 std::wcerr << L"1234"; 24 assert(std::wcerr.flags() & std::ios_base::unitbuf); 25 26 #ifdef _LIBCPP_HAS_NO_STDOUT 27 assert(std::wcerr.tie() == NULL); 28 #else 29 assert(std::wcerr.tie() == &std::wcout); 30 #endif 31 return 0; 32 } 33