summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/depr/depr.ios.members
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/depr/depr.ios.members')
-rw-r--r--libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp25
-rw-r--r--libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp25
-rw-r--r--libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp25
-rw-r--r--libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp25
-rw-r--r--libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp24
5 files changed, 124 insertions, 0 deletions
diff --git a/libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp b/libcxx/test/std/depr/depr.ios.members/io_state.pass.cpp
new file mode 100644
index 00000000000..15bfbf19780
--- /dev/null
+++ b/libcxx/test/std/depr/depr.ios.members/io_state.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+//
+// class ios_base
+// {
+// public:
+// typedef T1 io_state;
+// };
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+ std::strstream::io_state b = std::strstream::eofbit;
+ assert(b == std::ios::eofbit);
+}
diff --git a/libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp b/libcxx/test/std/depr/depr.ios.members/open_mode.pass.cpp
new file mode 100644
index 00000000000..12a8e945880
--- /dev/null
+++ b/libcxx/test/std/depr/depr.ios.members/open_mode.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+//
+// class ios_base
+// {
+// public:
+// typedef T2 open_mode;
+// };
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+ std::strstream::open_mode b = std::strstream::app;
+ assert(b == std::ios::app);
+}
diff --git a/libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp b/libcxx/test/std/depr/depr.ios.members/seek_dir.pass.cpp
new file mode 100644
index 00000000000..891a7a34563
--- /dev/null
+++ b/libcxx/test/std/depr/depr.ios.members/seek_dir.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+//
+// class ios_base
+// {
+// public:
+// typedef T3 seek_dir;
+// };
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+ std::strstream::seek_dir b = std::strstream::cur;
+ assert(b == std::ios::cur);
+}
diff --git a/libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp b/libcxx/test/std/depr/depr.ios.members/streamoff.pass.cpp
new file mode 100644
index 00000000000..4ccfd1f7d22
--- /dev/null
+++ b/libcxx/test/std/depr/depr.ios.members/streamoff.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+//
+// class ios_base
+// {
+// public:
+// typedef OFF_T streamoff;
+// };
+
+#include <ios>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_integral<std::ios_base::streamoff>::value), "");
+ static_assert((std::is_signed<std::ios_base::streamoff>::value), "");
+}
diff --git a/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp b/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp
new file mode 100644
index 00000000000..315118cb3e3
--- /dev/null
+++ b/libcxx/test/std/depr/depr.ios.members/streampos.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+//
+// class ios_base
+// {
+// public:
+// typedef POS_T streampos;
+// };
+
+#include <ios>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_same<std::ios_base::streampos, std::streampos>::value), "");
+}
OpenPOWER on IntegriCloud