summaryrefslogtreecommitdiff
path: root/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp')
-rw-r--r--test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp b/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp
new file mode 100644
index 0000000000000..1bdba0714f194
--- /dev/null
+++ b/test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <streambuf>
+
+// template <class charT, class traits = char_traits<charT> >
+// class basic_streambuf;
+
+// int_type underflow();
+
+#include <streambuf>
+#include <cassert>
+
+struct test
+ : public std::basic_streambuf<char>
+{
+ test() {}
+};
+
+int main()
+{
+ test t;
+ assert(t.sgetc() == -1);
+}