summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp')
-rw-r--r--libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp
new file mode 100644
index 00000000000..4a752d659b8
--- /dev/null
+++ b/libcxx/test/std/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.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.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// int pcount() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+ {
+ std::ostrstream out;
+ assert(out.pcount() == 0);
+ out << 123 << ' ' << 4.5 << ' ' << "dog";
+ assert(out.pcount() == 11);
+ }
+}
OpenPOWER on IntegriCloud