diff options
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
-rw-r--r-- | llvm/unittests/Support/ErrorTest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp index 9356402..d4d3302 100644 --- a/llvm/unittests/Support/ErrorTest.cpp +++ b/llvm/unittests/Support/ErrorTest.cpp @@ -958,8 +958,13 @@ TEST(Error, FileErrorTest) { "'file2.bin': CustomError {42}"), 0); - Error FE5 = createFileError("", make_error<CustomError>(1)); - EXPECT_EQ(toString(std::move(FE5)).compare("'': CustomError {1}"), 0); + Error FE5 = createFileError("", make_error<CustomError>(5)); + EXPECT_EQ(toString(std::move(FE5)).compare("'': CustomError {5}"), 0); + + Error FE6 = createFileError("unused", make_error<CustomError>(6)); + handleAllErrors(std::move(FE6), [](std::unique_ptr<FileError> F) { + EXPECT_EQ(F->messageWithoutFileInfo(), "CustomError {6}"); + }); } enum class test_error_code { |