aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Option/OptionParsingTest.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-08-28 00:02:06 +0000
committerRui Ueyama <ruiu@google.com>2013-08-28 00:02:06 +0000
commitc3779ff83b231d93407b34f809cdfa1427cfa0bf (patch)
tree53913a2a3cabc890bfbfbb9186cbca04bdee7f95 /llvm/unittests/Option/OptionParsingTest.cpp
parentc4d793f2ad9c4f4b4df7173aa327ab127b35899a (diff)
downloadllvm-c3779ff83b231d93407b34f809cdfa1427cfa0bf.zip
llvm-c3779ff83b231d93407b34f809cdfa1427cfa0bf.tar.gz
llvm-c3779ff83b231d93407b34f809cdfa1427cfa0bf.tar.bz2
Revert "Option parsing: support case-insensitive option matching." as it broke Windows buildbot.
This reverts r189416. llvm-svn: 189424
Diffstat (limited to 'llvm/unittests/Option/OptionParsingTest.cpp')
-rw-r--r--llvm/unittests/Option/OptionParsingTest.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/llvm/unittests/Option/OptionParsingTest.cpp b/llvm/unittests/Option/OptionParsingTest.cpp
index 11d6d1e..86286d1 100644
--- a/llvm/unittests/Option/OptionParsingTest.cpp
+++ b/llvm/unittests/Option/OptionParsingTest.cpp
@@ -20,7 +20,7 @@ using namespace llvm::opt;
enum ID {
OPT_INVALID = 0, // This is not an option ID.
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
- HELPTEXT, METAVAR) OPT_##ID,
+ HELPTEXT, METAVAR) OPT_##ID,
#include "Opts.inc"
LastOption
#undef OPTION
@@ -48,8 +48,8 @@ static const OptTable::Info InfoTable[] = {
namespace {
class TestOptTable : public OptTable {
public:
- TestOptTable(bool IgnoreCase = false)
- : OptTable(InfoTable, array_lengthof(InfoTable), IgnoreCase) {}
+ TestOptTable()
+ : OptTable(InfoTable, array_lengthof(InfoTable)) {}
};
}
@@ -157,26 +157,6 @@ TEST(Option, AliasArgs) {
EXPECT_EQ(AL->getAllArgValues(OPT_B)[1], "bar");
}
-TEST(Option, IgnoreCase) {
- TestOptTable T(true);
- unsigned MAI, MAC;
-
- const char *MyArgs[] = { "-a", "-joo" };
- OwningPtr<InputArgList> AL(T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC));
- EXPECT_TRUE(AL->hasArg(OPT_A));
- EXPECT_TRUE(AL->hasArg(OPT_B));
-}
-
-TEST(Option, DoNotIgnoreCase) {
- TestOptTable T;
- unsigned MAI, MAC;
-
- const char *MyArgs[] = { "-a", "-joo" };
- OwningPtr<InputArgList> AL(T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC));
- EXPECT_FALSE(AL->hasArg(OPT_A));
- EXPECT_FALSE(AL->hasArg(OPT_B));
-}
-
TEST(Option, SlurpEmpty) {
TestOptTable T;
unsigned MAI, MAC;