1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // XFAIL: libcpp-has-no-stdin 11 12 // <iostream> 13 14 // istream wcin; 15 16 #include <iostream> 17 #include <cassert> 18 19 int main() 20 { 21 #if 0 22 std::wcout << L"Hello World!\n"; 23 int i; 24 std::wcout << L"Enter a number: "; 25 std::wcin >> i; 26 std::wcout << L"The number is : " << i << L'\n'; 27 #else // 0 28 #ifdef _LIBCPP_HAS_NO_STDOUT 29 assert(std::wcin.tie() == NULL); 30 #else 31 assert(std::wcin.tie() == &std::wcout); 32 #endif 33 #endif 34 } 35