aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
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
commit0537a98878cc3af74a0b3a208e1e17ade28bfe57 (patch)
tree15a3705024c0295a87f7e87f92f10272ef7a2bf0 /llvm/unittests/Support/CommandLineTest.cpp
parentd25db7ed0f8ec288a770a75b88caaa688ac22079 (diff)
downloadllvm-0537a98878cc3af74a0b3a208e1e17ade28bfe57.zip
llvm-0537a98878cc3af74a0b3a208e1e17ade28bfe57.tar.gz
llvm-0537a98878cc3af74a0b3a208e1e17ade28bfe57.tar.bz2
Support command line option categories.
Patch by Dan Liew! llvm-svn: 181253
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp8
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