summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/ErrorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
-rw-r--r--llvm/unittests/Support/ErrorTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp
index ed3d1c1852c..d5af2cab967 100644
--- a/llvm/unittests/Support/ErrorTest.cpp
+++ b/llvm/unittests/Support/ErrorTest.cpp
@@ -149,14 +149,17 @@ TEST(Error, CheckCustomErrors) {
{
Error E = make_error<CustomError>(1);
Error F = make_error<CustomSubError>(1, 2);
+ Error G = Error::success();
EXPECT_TRUE(E.isA<CustomError>());
EXPECT_FALSE(E.isA<CustomSubError>());
EXPECT_TRUE(F.isA<CustomError>());
EXPECT_TRUE(F.isA<CustomSubError>());
+ EXPECT_FALSE(G.isA<CustomError>());
consumeError(std::move(E));
consumeError(std::move(F));
+ consumeError(std::move(G));
}
// Check that we can handle a custom error.
OpenPOWER on IntegriCloud