• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 cin;
15 
16 #include <iostream>
17 #include <cassert>
18 
main()19 int main()
20 {
21 #if 0
22     std::cout << "Hello World!\n";
23     int i;
24     std::cout << "Enter a number: ";
25     std::cin >> i;
26     std::cout << "The number is : " << i << '\n';
27 #else  // 0
28 #ifdef _LIBCPP_HAS_NO_STDOUT
29     assert(std::cin.tie() == NULL);
30 #else
31     assert(std::cin.tie() == &std::cout);
32 #endif
33 #endif
34 }
35