diff options
Diffstat (limited to 'libcxx/test/std/input.output/iostream.objects')
9 files changed, 222 insertions, 0 deletions
diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp new file mode 100644 index 00000000000..9206d173fc0 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cerr.pass.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream cerr; + +#include <iostream> +#include <cassert> + +int main() +{ +#if 0 + std::cerr << "Hello World!\n"; +#else + assert(std::cerr.tie() == &std::cout); + assert(std::cerr.flags() & std::ios_base::unitbuf); +#endif // 0 +} diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp new file mode 100644 index 00000000000..3481598aed9 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream cin; + +#include <iostream> +#include <cassert> + +int main() +{ +#if 0 + std::cout << "Hello World!\n"; + int i; + std::cout << "Enter a number: "; + std::cin >> i; + std::cout << "The number is : " << i << '\n'; +#else // 0 + assert(std::cin.tie() == &std::cout); +#endif +} diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp new file mode 100644 index 00000000000..3812b203ae0 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/clog.pass.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream clog; + +#include <iostream> + +int main() +{ +#if 0 + std::clog << "Hello World!\n"; +#else + (void)std::clog; +#endif +} diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp new file mode 100644 index 00000000000..6000ae274b9 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cout.pass.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream cout; + +#include <iostream> + +int main() +{ +#if 0 + std::cout << "Hello World!\n"; + int i; + std::cout << "Enter a number: "; + std::cin >> i; + std::cout << "The number is : " << i << '\n'; +#else // 0 + (void)std::cout; +#endif +} diff --git a/libcxx/test/std/input.output/iostream.objects/version.pass.cpp b/libcxx/test/std/input.output/iostream.objects/version.pass.cpp new file mode 100644 index 00000000000..09b3611f6df --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +#include <iostream> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp new file mode 100644 index 00000000000..19a1dcdcdb4 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr.pass.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream wcerr; + +#include <iostream> +#include <cassert> + +int main() +{ +#if 0 + std::wcerr << L"Hello World!\n"; +#else + assert(std::wcerr.tie() == &std::wcout); + assert(std::wcerr.flags() & std::ios_base::unitbuf); +#endif // 0 +} diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp new file mode 100644 index 00000000000..90a56685a67 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream wcin; + +#include <iostream> +#include <cassert> + +int main() +{ +#if 0 + std::wcout << L"Hello World!\n"; + int i; + std::wcout << L"Enter a number: "; + std::wcin >> i; + std::wcout << L"The number is : " << i << L'\n'; +#else // 0 + assert(std::wcin.tie() == &std::wcout); +#endif +} diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp new file mode 100644 index 00000000000..61ff5fb5089 --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wclog.pass.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream wclog; + +#include <iostream> + +int main() +{ +#if 0 + std::wclog << L"Hello World!\n"; +#else + (void)std::wclog; +#endif +} diff --git a/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp new file mode 100644 index 00000000000..7a546aa528d --- /dev/null +++ b/libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout.pass.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <iostream> + +// istream wcout; + +#include <iostream> + +int main() +{ +#if 0 + std::wcout << L"Hello World!\n"; +#else + (void)std::wcout; +#endif +} |