diff options
Diffstat (limited to 'clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp')
| -rw-r--r-- | clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp index 8b0fbc6ff75..dd2304562be 100644 --- a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp @@ -55,15 +55,16 @@ TEST(ParseLineFilter, ValidFilter) { } TEST(ParseConfiguration, ValidConfiguration) { - ClangTidyOptions Options; - std::error_code Error = parseConfiguration("Checks: \"-*,misc-*\"\n" - "HeaderFilterRegex: \".*\"\n" - "AnalyzeTemporaryDtors: true\n", - Options); - EXPECT_FALSE(Error); - EXPECT_EQ("-*,misc-*", *Options.Checks); - EXPECT_EQ(".*", *Options.HeaderFilterRegex); - EXPECT_TRUE(*Options.AnalyzeTemporaryDtors); + llvm::ErrorOr<ClangTidyOptions> Options = + parseConfiguration("Checks: \"-*,misc-*\"\n" + "HeaderFilterRegex: \".*\"\n" + "AnalyzeTemporaryDtors: true\n" + "User: some.user"); + EXPECT_TRUE(!!Options); + EXPECT_EQ("-*,misc-*", *Options->Checks); + EXPECT_EQ(".*", *Options->HeaderFilterRegex); + EXPECT_TRUE(*Options->AnalyzeTemporaryDtors); + EXPECT_EQ("some.user", *Options->User); } } // namespace test |

