diff options
Diffstat (limited to 'libcxx/test/input.output/stream.buffers/streambuf')
37 files changed, 0 insertions, 1602 deletions
diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp deleted file mode 100644 index 469c7449971..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// basic_streambuf(const basic_streambuf& rhs); // protected - -#include <streambuf> -#include <cassert> - -std::streambuf get(); - -int main() -{ - std::streambuf sb = get(); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp deleted file mode 100644 index c1e18392b6c..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp +++ /dev/null @@ -1,84 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// basic_streambuf(const basic_streambuf& rhs); - -#include <streambuf> -#include <cassert> - -#include "platform_support.h" // locale name macros - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - test() {} - - test(const test& t) - : std::basic_streambuf<CharT>(t) - { - assert(this->eback() == t.eback()); - assert(this->gptr() == t.gptr()); - assert(this->egptr() == t.egptr()); - assert(this->pbase() == t.pbase()); - assert(this->pptr() == t.pptr()); - assert(this->epptr() == t.epptr()); - assert(this->getloc() == t.getloc()); - } - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test<char> t; - test<char> t2 = t; - } - { - test<wchar_t> t; - test<wchar_t> t2 = t; - } - { - char g1, g2, g3, p1, p3; - test<char> t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test<char> t2 = t; - } - { - wchar_t g1, g2, g3, p1, p3; - test<wchar_t> t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test<wchar_t> t2 = t; - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test<char> t; - test<char> t2 = t; - } - { - test<wchar_t> t; - test<wchar_t> t2 = t; - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp deleted file mode 100644 index 7f57f3cf930..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.fail.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// basic_streambuf(); // is protected - -#include <streambuf> - -int main() -{ - std::basic_streambuf<char> sb; -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp deleted file mode 100644 index d8ca8aebc62..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// basic_streambuf(); - -#include <streambuf> -#include <cassert> - -#include "platform_support.h" // locale name macros - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() - { - assert(this->eback() == 0); - assert(this->gptr() == 0); - assert(this->egptr() == 0); - assert(this->pbase() == 0); - assert(this->pptr() == 0); - assert(this->epptr() == 0); - } -}; - -int main() -{ - { - test<char> t; - assert(t.getloc().name() == "C"); - } - { - test<wchar_t> t; - assert(t.getloc().name() == "C"); - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test<char> t; - assert(t.getloc().name() == LOCALE_en_US_UTF_8); - } - { - test<wchar_t> t; - assert(t.getloc().name() == LOCALE_en_US_UTF_8); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp deleted file mode 100644 index 2c77f25c2e5..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekoff.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// pos_type pubseekoff(off_type off, ios_base::seekdir way, -// ios_base::openmode which = ios_base::in | ios_base::out); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() {} -}; - -int main() -{ - { - test<char> t; - assert(t.pubseekoff(0, std::ios_base::beg) == -1); - assert(t.pubseekoff(0, std::ios_base::beg, std::ios_base::app) == -1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp deleted file mode 100644 index 0b9ddff4106..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubseekpos.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// pos_type pubseekpos(pos_type sp, -// ios_base::openmode which = ios_base::in | ios_base::out; - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() {} -}; - -int main() -{ - { - test<char> t; - assert(t.pubseekpos(0, std::ios_base::app) == -1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp deleted file mode 100644 index 8cf62771e49..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsetbuf.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// basic_streambuf* pubsetbuf(char_type* s, streamsize n); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() {} -}; - -int main() -{ - { - test<char> t; - assert(t.pubsetbuf(0, 0) == &t); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp deleted file mode 100644 index cc167907161..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.buffer/pubsync.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 pubsync(); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() {} -}; - -int main() -{ - { - test<char> t; - assert(t.pubsync() == 0); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp deleted file mode 100644 index deb2dc7c139..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// REQUIRES: locale.en_US.UTF-8 -// REQUIRES: locale.fr_FR.UTF-8 - -// <streambuf> - -// template <class charT, class traits = char_traits<charT> > -// class basic_streambuf; - -// locale pubimbue(const locale& loc); -// locale getloc() const; - -#include <streambuf> -#include <cassert> - -#include "platform_support.h" // locale name macros - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() {} - - void imbue(const std::locale&) - { - assert(this->getloc().name() == LOCALE_en_US_UTF_8); - } -}; - -int main() -{ - { - test<char> t; - assert(t.getloc().name() == "C"); - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test<char> t; - assert(t.getloc().name() == LOCALE_en_US_UTF_8); - assert(t.pubimbue(std::locale(LOCALE_fr_FR_UTF_8)).name() == "en_US.UTF-8"); - assert(t.getloc().name() == LOCALE_fr_FR_UTF_8); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp deleted file mode 100644 index 200150639b9..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/in_avail.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// streamsize in_avail(); - -#include <streambuf> -#include <cassert> - -int showmanyc_called = 0; - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - - test() {} - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } -protected: - std::streamsize showmanyc() - { - ++showmanyc_called; - return 5; - } -}; - -int main() -{ - { - test<char> t; - assert(t.in_avail() == 5); - assert(showmanyc_called == 1); - char in[5]; - t.setg(in, in+2, in+5); - assert(t.in_avail() == 3); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp deleted file mode 100644 index ac6d0cc932a..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sbumpc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 sbumpc(); - -#include <streambuf> -#include <cassert> - -int uflow_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type uflow() - { - ++uflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(uflow_called == 0); - assert(t.sbumpc() == 'a'); - assert(uflow_called == 1); - char in[] = "ABC"; - t.setg(in, in, in+sizeof(in)); - assert(t.sbumpc() == 'A'); - assert(uflow_called == 1); - assert(t.sbumpc() == 'B'); - assert(uflow_called == 1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp deleted file mode 100644 index c68930cfa84..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 sgetc(); - -#include <streambuf> -#include <cassert> - -int underflow_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type underflow() - { - ++underflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(underflow_called == 0); - assert(t.sgetc() == 'a'); - assert(underflow_called == 1); - char in[] = "ABC"; - t.setg(in, in, in+sizeof(in)); - assert(t.sgetc() == 'A'); - assert(underflow_called == 1); - assert(t.sgetc() == 'A'); - assert(underflow_called == 1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp deleted file mode 100644 index 730cedeea76..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// streamsize sgetn(char_type* s, streamsize n); - -#include <streambuf> -#include <cassert> - -int xsgetn_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - test() {} - -protected: - std::streamsize xsgetn(char_type* s, std::streamsize n) - { - ++xsgetn_called; - return 10; - } -}; - -int main() -{ - test t; - assert(xsgetn_called == 0); - assert(t.sgetn(0, 0) == 10); - assert(xsgetn_called == 1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp deleted file mode 100644 index 7f44245e26e..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/snextc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 snextc(); - -#include <streambuf> -#include <cassert> - -int uflow_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type uflow() - { - ++uflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(uflow_called == 0); - assert(t.snextc() == -1); - assert(uflow_called == 1); - char in[] = "ABC"; - t.setg(in, in, in+sizeof(in)); - assert(t.snextc() == 'B'); - assert(uflow_called == 1); - assert(t.snextc() == 'C'); - assert(uflow_called == 1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp deleted file mode 100644 index 34a2a2dda37..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 sputbackc(char_type c); - -#include <streambuf> -#include <cassert> - -int pbackfail_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type pbackfail(int_type c = traits_type::eof()) - { - ++pbackfail_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(pbackfail_called == 0); - assert(t.sputbackc('A') == 'a'); - assert(pbackfail_called == 1); - char in[] = "ABC"; - t.setg(in, in+1, in+sizeof(in)); - assert(t.sputbackc('A') == 'A'); - assert(pbackfail_called == 1); - assert(t.sputbackc('A') == 'a'); - assert(pbackfail_called == 2); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp deleted file mode 100644 index 4c68fada07a..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 sungetc(); - -#include <streambuf> -#include <cassert> - -int pbackfail_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - -protected: - int_type pbackfail(int_type c = traits_type::eof()) - { - ++pbackfail_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(pbackfail_called == 0); - assert(t.sungetc() == 'a'); - assert(pbackfail_called == 1); - char in[] = "ABC"; - t.setg(in, in+1, in+sizeof(in)); - assert(t.sungetc() == 'A'); - assert(pbackfail_called == 1); - assert(t.sungetc() == 'a'); - assert(pbackfail_called == 2); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp deleted file mode 100644 index b04b8b0acc9..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 sputc(char_type c); - -#include <streambuf> -#include <cassert> - -int overflow_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(char* pbeg, char* pend) - { - base::setp(pbeg, pend); - } - -protected: - int_type overflow(int_type c = traits_type::eof()) - { - ++overflow_called; - return 'a'; - } -}; - -int main() -{ - { - test t; - assert(overflow_called == 0); - assert(t.sputc('A') == 'a'); - assert(overflow_called == 1); - char out[3] = {0}; - t.setp(out, out+sizeof(out)); - assert(t.sputc('A') == 'A'); - assert(overflow_called == 1); - assert(out[0] == 'A'); - assert(t.sputc('B') == 'B'); - assert(overflow_called == 1); - assert(out[0] == 'A'); - assert(out[1] == 'B'); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp deleted file mode 100644 index e03e8e0cbda..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// streamsize sputn(const char_type* s, streamsize n); - -#include <streambuf> -#include <cassert> - -int xsputn_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - test() {} - -protected: - std::streamsize xsputn(const char_type* s, std::streamsize n) - { - ++xsputn_called; - return 5; - } -}; - -int main() -{ - test t; - assert(xsputn_called == 0); - assert(t.sputn(0, 0) == 5); - assert(xsputn_called == 1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp deleted file mode 100644 index 803198938f6..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// basic_streambuf& operator=(const basic_streambuf& rhs); - -#include <streambuf> -#include <cassert> - -#include "platform_support.h" // locale name macros - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - test() {} - - test& operator=(const test& t) - { - base::operator=(t); - assert(this->eback() == t.eback()); - assert(this->gptr() == t.gptr()); - assert(this->egptr() == t.egptr()); - assert(this->pbase() == t.pbase()); - assert(this->pptr() == t.pptr()); - assert(this->epptr() == t.epptr()); - assert(this->getloc() == t.getloc()); - return *this; - } - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test<char> t; - test<char> t2; - t2 = t; - } - { - test<wchar_t> t; - test<wchar_t> t2; - t2 = t; - } - { - char g1, g2, g3, p1, p3; - test<char> t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test<char> t2; - t2 = t; - } - { - wchar_t g1, g2, g3, p1, p3; - test<wchar_t> t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test<wchar_t> t2; - t2 = t; - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test<char> t; - test<char> t2; - t2 = t; - } - { - test<wchar_t> t; - test<wchar_t> t2; - t2 = t; - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp deleted file mode 100644 index 7a23206b42d..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp +++ /dev/null @@ -1,101 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// void swap(basic_streambuf& rhs); - -#include <streambuf> -#include <cassert> - -#include "platform_support.h" // locale name macros - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - test() {} - - void swap(test& t) - { - test old_this(*this); - test old_that(t); - base::swap(t); - assert(this->eback() == old_that.eback()); - assert(this->gptr() == old_that.gptr()); - assert(this->egptr() == old_that.egptr()); - assert(this->pbase() == old_that.pbase()); - assert(this->pptr() == old_that.pptr()); - assert(this->epptr() == old_that.epptr()); - assert(this->getloc() == old_that.getloc()); - - assert(t.eback() == old_this.eback()); - assert(t.gptr() == old_this.gptr()); - assert(t.egptr() == old_this.egptr()); - assert(t.pbase() == old_this.pbase()); - assert(t.pptr() == old_this.pptr()); - assert(t.epptr() == old_this.epptr()); - assert(t.getloc() == old_this.getloc()); - return *this; - } - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test<char> t; - test<char> t2; - swap(t2, t); - } - { - test<wchar_t> t; - test<wchar_t> t2; - swap(t2, t); - } - { - char g1, g2, g3, p1, p3; - test<char> t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test<char> t2; - swap(t2, t); - } - { - wchar_t g1, g2, g3, p1, p3; - test<wchar_t> t; - t.setg(&g1, &g2, &g3); - t.setp(&p1, &p3); - test<wchar_t> t2; - swap(t2, t); - } - std::locale::global(std::locale(LOCALE_en_US_UTF_8)); - { - test<char> t; - test<char> t2; - swap(t2, t); - } - { - test<wchar_t> t; - test<wchar_t> t2; - swap(t2, t); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp deleted file mode 100644 index ce25a191914..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/gbump.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// void gbump(int n); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - - test() {} - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - } - - void gbump(int n) - { - CharT* gbeg = base::eback(); - CharT* gnext = base::gptr(); - CharT* gend = base::egptr(); - base::gbump(n); - assert(base::eback() == gbeg); - assert(base::gptr() == gnext+n); - assert(base::egptr() == gend); - } -}; - -int main() -{ - { - test<char> t; - char in[] = "ABCDE"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - t.gbump(2); - } - { - test<wchar_t> t; - wchar_t in[] = L"ABCDE"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - t.gbump(3); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp deleted file mode 100644 index 68dcf6eab8f..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// void setg(char_type* gbeg, char_type* gnext, char_type* gend); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - - test() {} - - void setg(CharT* gbeg, CharT* gnext, CharT* gend) - { - base::setg(gbeg, gnext, gend); - assert(base::eback() == gbeg); - assert(base::gptr() == gnext); - assert(base::egptr() == gend); - } -}; - -int main() -{ - { - test<char> t; - char in[] = "ABC"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - } - { - test<wchar_t> t; - wchar_t in[] = L"ABC"; - t.setg(in, in+1, in+sizeof(in)/sizeof(in[0])); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp deleted file mode 100644 index 47ef939142a..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// void pbump(int n); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - - test() {} - - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - } - - void pbump(int n) - { - CharT* pbeg = base::pbase(); - CharT* pnext = base::pptr(); - CharT* pend = base::epptr(); - base::pbump(n); - assert(base::pbase() == pbeg); - assert(base::pptr() == pnext+n); - assert(base::epptr() == pend); - } -}; - -int main() -{ - { - test<char> t; - char in[] = "ABCDE"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - t.pbump(2); - t.pbump(1); - } - { - test<wchar_t> t; - wchar_t in[] = L"ABCDE"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - t.pbump(3); - t.pbump(1); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp deleted file mode 100644 index fa4133a475d..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// void setp(char_type* pbeg, char_type* pend); - -#include <streambuf> -#include <cassert> - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - typedef std::basic_streambuf<CharT> base; - - test() {} - - void setp(CharT* pbeg, CharT* pend) - { - base::setp(pbeg, pend); - assert(base::pbase() == pbeg); - assert(base::pptr() == pbeg); - assert(base::epptr() == pend); - } -}; - -int main() -{ - { - test<char> t; - char in[] = "ABC"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - } - { - test<wchar_t> t; - wchar_t in[] = L"ABC"; - t.setp(in, in+sizeof(in)/sizeof(in[0])); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.buffer/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp deleted file mode 100644 index acaf1e8461e..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/showmanyc.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// streamsize showmanyc(); - -#include <streambuf> -#include <cassert> - -int showmanyc_called = 0; - -template <class CharT> -struct test - : public std::basic_streambuf<CharT> -{ - test() {} -}; - -int main() -{ - test<char> t; - assert(t.in_avail() == 0); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp deleted file mode 100644 index d25ae9b21bf..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/uflow.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 uflow(); - -#include <streambuf> -#include <cassert> - -int underflow_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - test() {} - -}; - -int main() -{ - test t; - assert(t.sgetc() == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp deleted file mode 100644 index 1bdba0714f1..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/underflow.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp deleted file mode 100644 index b1f15427367..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// streamsize xsgetn(char_type* s, streamsize n); - -#include <streambuf> -#include <cassert> - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setg(char* gbeg, char* gnext, char* gend) - { - base::setg(gbeg, gnext, gend); - } -}; - -int main() -{ - test t; - char input[7] = "123456"; - t.setg(input, input, input+7); - char output[sizeof(input)] = {0}; - assert(t.sgetn(output, 10) == 7); - assert(strcmp(input, output) == 0); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.locales/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp deleted file mode 100644 index 3a10d8a70ad..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.pback/pbackfail.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 pbackfail(int_type c = traits::eof()); - -#include <streambuf> -#include <cassert> - -int pbackfail_called = 0; - -struct test - : public std::basic_streambuf<char> -{ - test() {} -}; - -int main() -{ - test t; - assert(t.sputbackc('A') == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp deleted file mode 100644 index dcdd45f5ff1..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/overflow.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 overflow(int_type c = traits::eof()); - -#include <streambuf> -#include <cassert> - -struct test - : public std::basic_streambuf<char> -{ - test() {} -}; - -int main() -{ - test t; - assert(t.sputc('A') == -1); -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp deleted file mode 100644 index 93dc15401e9..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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; - -// streamsize xsputn(const char_type* s, streamsize n); - -#include <streambuf> -#include <cassert> - -struct test - : public std::basic_streambuf<char> -{ - typedef std::basic_streambuf<char> base; - - test() {} - - void setp(char* pbeg, char* pend) - { - base::setp(pbeg, pend); - } -}; - -int main() -{ - { - test t; - char in[] = "123456"; - assert(t.sputn(in, sizeof(in)) == 0); - char out[sizeof(in)] = {0}; - t.setp(out, out+sizeof(out)); - assert(t.sputn(in, sizeof(in)) == sizeof(in)); - assert(strcmp(in, out) == 0); - } -} diff --git a/libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp deleted file mode 100644 index 919caee3655..00000000000 --- a/libcxx/test/input.output/stream.buffers/streambuf/types.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// { -// public: -// // types: -// typedef charT char_type; -// typedef traits traits_type; -// typedef typename traits_type::int_type int_type; -// typedef typename traits_type::pos_type pos_type; -// typedef typename traits_type::off_type off_type; - -#include <streambuf> -#include <type_traits> - -int main() -{ - static_assert((std::is_same<std::streambuf::char_type, char>::value), ""); - static_assert((std::is_same<std::streambuf::traits_type, std::char_traits<char> >::value), ""); - static_assert((std::is_same<std::streambuf::int_type, std::char_traits<char>::int_type>::value), ""); - static_assert((std::is_same<std::streambuf::pos_type, std::char_traits<char>::pos_type>::value), ""); - static_assert((std::is_same<std::streambuf::off_type, std::char_traits<char>::off_type>::value), ""); - - static_assert((std::is_same<std::wstreambuf::char_type, wchar_t>::value), ""); - static_assert((std::is_same<std::wstreambuf::traits_type, std::char_traits<wchar_t> >::value), ""); - static_assert((std::is_same<std::wstreambuf::int_type, std::char_traits<wchar_t>::int_type>::value), ""); - static_assert((std::is_same<std::wstreambuf::pos_type, std::char_traits<wchar_t>::pos_type>::value), ""); - static_assert((std::is_same<std::wstreambuf::off_type, std::char_traits<wchar_t>::off_type>::value), ""); -} |