mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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<int> TestOption1("test-option-1");
|
||||
cl::opt<int> TestOption2("test-option-2", cl::cat(TestCategory));
|
||||
cl::opt<int> 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<cl::Option *> Map;
|
||||
cl::getRegisteredOptions(Map);
|
||||
ASSERT_EQ(cl::NotHidden, Map["help"]->getOptionHiddenFlag())
|
||||
<< "Hid default option that should be visable.";
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
Reference in New Issue
Block a user