aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ErrorTest.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-08-14 13:59:04 +0000
committerPavel Labath <pavel@labath.sk>2019-08-14 13:59:04 +0000
commit0d802a4923e6a603aa1ee06d0969a793cc93f858 (patch)
treefde71a9121ecb420aef7eb9c858b3101056a836e /llvm/unittests/Support/ErrorTest.cpp
parent571c52af58d91662f2a7f2c7570bab63dee71a53 (diff)
downloadllvm-0d802a4923e6a603aa1ee06d0969a793cc93f858.zip
llvm-0d802a4923e6a603aa1ee06d0969a793cc93f858.tar.gz
llvm-0d802a4923e6a603aa1ee06d0969a793cc93f858.tar.bz2
Revert "raw_ostream: add operator<< overload for std::error_code"
This reverts commit r368849, because it breaks some bots (e.g. llvm-clang-x86_64-win-fast). It turns out this is not as NFC as we had hoped, because operator== will consider two std::error_codes to be distinct even though they both hold "success" values if they have different categories. llvm-svn: 368854
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
-rw-r--r--llvm/unittests/Support/ErrorTest.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp
index ec5c30b5..c4a9f3e 100644
--- a/llvm/unittests/Support/ErrorTest.cpp
+++ b/llvm/unittests/Support/ErrorTest.cpp
@@ -933,7 +933,7 @@ public:
class TestErrorCategory : public std::error_category {
public:
- const char *name() const noexcept override { return "test_error"; }
+ const char *name() const noexcept override { return "error"; }
std::string message(int Condition) const override {
switch (static_cast<test_error_code>(Condition)) {
case test_error_code::unspecified:
@@ -975,11 +975,4 @@ TEST(Error, SubtypeStringErrorTest) {
0);
}
-TEST(Error, error_codeErrorMessageTest) {
- EXPECT_NONFATAL_FAILURE(
- EXPECT_EQ(make_error_code(test_error_code::unspecified),
- make_error_code(test_error_code::error_2)),
- "Which is: An unknown error has occurred. (test_error:1)");
-}
-
} // namespace