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
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <cassert>
|
||||
|
||||
#include "min_allocator.h"
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
@@ -66,44 +65,6 @@ int main(int, char**)
|
||||
in >> s;
|
||||
assert(in.fail());
|
||||
}
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
{
|
||||
std::stringbuf sb;
|
||||
std::istream is(&sb);
|
||||
is.exceptions(std::ios::failbit);
|
||||
|
||||
bool threw = false;
|
||||
try {
|
||||
std::string s;
|
||||
is >> s;
|
||||
} catch (std::ios::failure const&) {
|
||||
threw = true;
|
||||
}
|
||||
|
||||
assert(!is.bad());
|
||||
assert(is.fail());
|
||||
assert(is.eof());
|
||||
assert(threw);
|
||||
}
|
||||
{
|
||||
std::stringbuf sb;
|
||||
std::istream is(&sb);
|
||||
is.exceptions(std::ios::eofbit);
|
||||
|
||||
bool threw = false;
|
||||
try {
|
||||
std::string s;
|
||||
is >> s;
|
||||
} catch (std::ios::failure const&) {
|
||||
threw = true;
|
||||
}
|
||||
|
||||
assert(!is.bad());
|
||||
assert(is.fail());
|
||||
assert(is.eof());
|
||||
assert(threw);
|
||||
}
|
||||
#endif // TEST_HAS_NO_EXCEPTIONS
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
|
||||
Reference in New Issue
Block a user