diff options
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 4fb20b1..43c9452 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -170,8 +170,12 @@ TEST(CommandLineTest, UseOptionCategory) { TEST(CommandLineTest, UseMultipleCategories) { StackOption<int> TestOption2("test-option2", cl::cat(TestCategory), + cl::cat(cl::GeneralCategory), cl::cat(cl::GeneralCategory)); + // Make sure cl::GeneralCategory wasn't added twice. + ASSERT_EQ(TestOption2.Categories.size(), 2U); + ASSERT_NE(TestOption2.Categories.end(), find_if(TestOption2.Categories, [&](const llvm::cl::OptionCategory *Cat) { |