diff options
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
| -rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 43c8cbd..815212f 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -66,4 +66,12 @@ TEST(CommandLineTest, ParseEnvironmentToLocalVar) { #endif // SKIP_ENVIRONMENT_TESTS +TEST(CommandLineTest, UseOptionCategory) { + cl::OptionCategory TestCategory("Test Options", "Description"); + cl::opt<int> TestOption("test-option", cl::cat(TestCategory)); + + ASSERT_EQ(&TestCategory,TestOption.Category) << "Failed to assign Option " + "Category."; +} + } // anonymous namespace |
