aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index e68761e..dd02d92 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -391,7 +391,8 @@ TEST(CommandLineTest, HideUnrelatedOptions) {
StringMap<cl::Option *> &Map =
cl::getRegisteredOptions(*cl::TopLevelSubCommand);
- ASSERT_EQ(cl::NotHidden, Map["help"]->getOptionHiddenFlag())
+ ASSERT_TRUE(Map.count("help") == (size_t)0 ||
+ cl::NotHidden == Map["help"]->getOptionHiddenFlag())
<< "Hid default option that should be visable.";
}
@@ -416,7 +417,8 @@ TEST(CommandLineTest, HideUnrelatedOptionsMulti) {
StringMap<cl::Option *> &Map =
cl::getRegisteredOptions(*cl::TopLevelSubCommand);
- ASSERT_EQ(cl::NotHidden, Map["help"]->getOptionHiddenFlag())
+ ASSERT_TRUE(Map.count("help") == (size_t)0 ||
+ cl::NotHidden == Map["help"]->getOptionHiddenFlag())
<< "Hid default option that should be visable.";
}