From 15ac9363a7f139ae674c99a883fbeae9a239f3ce Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Tue, 27 Jan 2015 03:03:47 +0000 Subject: Revert r227148 & r227154 which added a test which infinitely loops. r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly outputs two following lines: -tool: CommandLine Error: Option 'test-option-1' registered more than once! -tool: CommandLine Error: Option 'test-option-2' registered more than once! r227154 depends on changes from r227148 llvm-svn: 227167 --- llvm/unittests/Support/CommandLineTest.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'llvm/unittests/Support/CommandLineTest.cpp') diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 8e84bd9..4fa14e2 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -247,29 +247,4 @@ TEST(CommandLineTest, HideUnrelatedOptions) { << "Hid default option that should be visable."; } -cl::OptionCategory TestCategory2("Test Options set 2", "Description"); - -TEST(CommandLineTest, HideUnrelatedOptionsMulti) { - cl::opt TestOption1("test-option-1"); - cl::opt TestOption2("test-option-2", cl::cat(TestCategory)); - cl::opt TestOption3("test-option-3", cl::cat(TestCategory2)); - - const cl::OptionCategory *VisibleCategories[] = {&TestCategory, - &TestCategory2}; - - cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories)); - - ASSERT_EQ(cl::ReallyHidden, TestOption1.getOptionHiddenFlag()) - << "Failed to hide extra option."; - ASSERT_EQ(cl::NotHidden, TestOption2.getOptionHiddenFlag()) - << "Hid extra option that should be visable."; - ASSERT_EQ(cl::NotHidden, TestOption3.getOptionHiddenFlag()) - << "Hid extra option that should be visable."; - - StringMap Map; - cl::getRegisteredOptions(Map); - ASSERT_EQ(cl::NotHidden, Map["help"]->getOptionHiddenFlag()) - << "Hid default option that should be visable."; -} - } // anonymous namespace -- cgit v1.1