From 38b7e74836e314ec15c16d9106d2e2cf295e349a Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 2 Apr 2019 22:21:27 +0000 Subject: Revert "[libc++] Fix error flags and exceptions propagated from input stream operations" This reverts commits r357533 and r357531, which broke the LLDB data formatters. I'll hold off until we know how to fix the data formatters accordingly. llvm-svn: 357536 --- .../string.nonmembers/string.io/get_line.pass.cpp | 82 +--------------------- 1 file changed, 1 insertion(+), 81 deletions(-) (limited to 'libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp') diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp index 6069f8e377e..8e663cb4f60 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp @@ -18,7 +18,6 @@ #include #include "min_allocator.h" -#include "test_macros.h" int main(int, char**) { @@ -78,85 +77,6 @@ int main(int, char**) assert(s == L" ghij"); } #endif -#ifndef TEST_HAS_NO_EXCEPTIONS - { - std::basic_stringbuf sb("hello"); - std::basic_istream is(&sb); - is.exceptions(std::ios_base::eofbit); - - std::basic_string s; - bool threw = false; - try { - std::getline(is, s); - } catch (std::ios::failure const&) { - threw = true; - } - - assert(!is.bad()); - assert(!is.fail()); - assert( is.eof()); - assert(threw); - assert(s == "hello"); - } - { - std::basic_stringbuf sb(L"hello"); - std::basic_istream is(&sb); - is.exceptions(std::ios_base::eofbit); - - std::basic_string s; - bool threw = false; - try { - std::getline(is, s); - } catch (std::ios::failure const&) { - threw = true; - } - - assert(!is.bad()); - assert(!is.fail()); - assert( is.eof()); - assert(threw); - assert(s == L"hello"); - } - - { - std::basic_stringbuf sb; - std::basic_istream is(&sb); - is.exceptions(std::ios_base::failbit); - - std::basic_string s; - bool threw = false; - try { - std::getline(is, s); - } catch (std::ios::failure const&) { - threw = true; - } - - assert(!is.bad()); - assert( is.fail()); - assert( is.eof()); - assert(threw); - assert(s == ""); - } - { - std::basic_stringbuf sb; - std::basic_istream is(&sb); - is.exceptions(std::ios_base::failbit); - - std::basic_string s; - bool threw = false; - try { - std::getline(is, s); - } catch (std::ios::failure const&) { - threw = true; - } - - assert(!is.bad()); - assert( is.fail()); - assert( is.eof()); - assert(threw); - assert(s == L""); - } -#endif // TEST_HAS_NO_EXCEPTIONS - return 0; + return 0; } -- cgit v1.2.3