aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-05-06 21:56:23 +0000
committerAndrew Trick <atrick@apple.com>2013-05-06 21:56:23 +0000
commitb7ad33b7195cb99b0cbb1c5308324d328650ca45 (patch)
tree73a7eabb363d903eb052d85ecb3e01458d55c9de /unittests
parentb072090f3975bb155304b2e7dc313997132dbd25 (diff)
Support command line option categories.
Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/CommandLineTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Support/CommandLineTest.cpp b/unittests/Support/CommandLineTest.cpp
index 43c8cbd123..815212ff39 100644
--- a/unittests/Support/CommandLineTest.cpp
+++ b/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