diff options
author | Lang Hames <lhames@gmail.com> | 2017-08-24 05:35:27 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2017-08-24 05:35:27 +0000 |
commit | 7febf2baff79e29d1e3b0c445407c3ce1df0f685 (patch) | |
tree | ae9f912db7df378b1f402cf6658a19ac7d0ab757 /llvm/unittests/Support/ErrorTest.cpp | |
parent | a131d3fb29ebfeea79cd42e843dee861d67d3818 (diff) | |
download | llvm-7febf2baff79e29d1e3b0c445407c3ce1df0f685.zip llvm-7febf2baff79e29d1e3b0c445407c3ce1df0f685.tar.gz llvm-7febf2baff79e29d1e3b0c445407c3ce1df0f685.tar.bz2 |
[Support] Rewrite handleAllErrors in terms of cantFail.
This just switches handleAllErrors from using custom assertions that all errors
have been handled to using cantFail. This change involves moving some of the
class and function definitions around though.
llvm-svn: 311631
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
-rw-r--r-- | llvm/unittests/Support/ErrorTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp index a762cf0..9f22892 100644 --- a/llvm/unittests/Support/ErrorTest.cpp +++ b/llvm/unittests/Support/ErrorTest.cpp @@ -386,7 +386,8 @@ TEST(Error, FailureToHandle) { }); }; - EXPECT_DEATH(FailToHandle(), "Program aborted due to an unhandled Error:") + EXPECT_DEATH(FailToHandle(), + "Failure value returned from cantFail wrapped call") << "Unhandled Error in handleAllErrors call did not cause an " "abort()"; } @@ -405,7 +406,7 @@ TEST(Error, FailureFromHandler) { }; EXPECT_DEATH(ReturnErrorFromHandler(), - "Program aborted due to an unhandled Error:") + "Failure value returned from cantFail wrapped call") << " Error returned from handler in handleAllErrors call did not " "cause abort()"; } |