diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /unittests/Option | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'unittests/Option')
-rw-r--r-- | unittests/Option/OptionParsingTest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/unittests/Option/OptionParsingTest.cpp b/unittests/Option/OptionParsingTest.cpp index 6beb286..aa32da3 100644 --- a/unittests/Option/OptionParsingTest.cpp +++ b/unittests/Option/OptionParsingTest.cpp @@ -68,7 +68,7 @@ TEST(Option, OptionParsing) { TestOptTable T; unsigned MAI, MAC; std::unique_ptr<InputArgList> AL( - T.ParseArgs(Args, array_endof(Args), MAI, MAC)); + T.ParseArgs(std::begin(Args), std::end(Args), MAI, MAC)); // Check they all exist. EXPECT_TRUE(AL->hasArg(OPT_A)); @@ -114,7 +114,7 @@ TEST(Option, ParseWithFlagExclusions) { std::unique_ptr<InputArgList> AL; // Exclude flag3 to avoid parsing as OPT_SLASH_C. - AL.reset(T.ParseArgs(Args, array_endof(Args), MAI, MAC, + AL.reset(T.ParseArgs(std::begin(Args), std::end(Args), MAI, MAC, /*FlagsToInclude=*/0, /*FlagsToExclude=*/OptFlag3)); EXPECT_TRUE(AL->hasArg(OPT_A)); @@ -122,7 +122,7 @@ TEST(Option, ParseWithFlagExclusions) { EXPECT_FALSE(AL->hasArg(OPT_SLASH_C)); // Exclude flag1 to avoid parsing as OPT_C. - AL.reset(T.ParseArgs(Args, array_endof(Args), MAI, MAC, + AL.reset(T.ParseArgs(std::begin(Args), std::end(Args), MAI, MAC, /*FlagsToInclude=*/0, /*FlagsToExclude=*/OptFlag1)); EXPECT_TRUE(AL->hasArg(OPT_B)); @@ -130,7 +130,7 @@ TEST(Option, ParseWithFlagExclusions) { EXPECT_TRUE(AL->hasArg(OPT_SLASH_C)); const char *NewArgs[] = { "/C", "foo", "--C=bar" }; - AL.reset(T.ParseArgs(NewArgs, array_endof(NewArgs), MAI, MAC)); + AL.reset(T.ParseArgs(std::begin(NewArgs), std::end(NewArgs), MAI, MAC)); EXPECT_TRUE(AL->hasArg(OPT_SLASH_C)); EXPECT_TRUE(AL->hasArg(OPT_C)); EXPECT_EQ(AL->getLastArgValue(OPT_SLASH_C), "foo"); @@ -143,7 +143,7 @@ TEST(Option, ParseAliasInGroup) { const char *MyArgs[] = { "-I" }; std::unique_ptr<InputArgList> AL( - T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC)); + T.ParseArgs(std::begin(MyArgs), std::end(MyArgs), MAI, MAC)); EXPECT_TRUE(AL->hasArg(OPT_H)); } @@ -153,7 +153,7 @@ TEST(Option, AliasArgs) { const char *MyArgs[] = { "-J", "-Joo" }; std::unique_ptr<InputArgList> AL( - T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC)); + T.ParseArgs(std::begin(MyArgs), std::end(MyArgs), MAI, MAC)); EXPECT_TRUE(AL->hasArg(OPT_B)); EXPECT_EQ(AL->getAllArgValues(OPT_B)[0], "foo"); EXPECT_EQ(AL->getAllArgValues(OPT_B)[1], "bar"); @@ -165,7 +165,7 @@ TEST(Option, IgnoreCase) { const char *MyArgs[] = { "-a", "-joo" }; std::unique_ptr<InputArgList> AL( - T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC)); + T.ParseArgs(std::begin(MyArgs), std::end(MyArgs), MAI, MAC)); EXPECT_TRUE(AL->hasArg(OPT_A)); EXPECT_TRUE(AL->hasArg(OPT_B)); } @@ -176,7 +176,7 @@ TEST(Option, DoNotIgnoreCase) { const char *MyArgs[] = { "-a", "-joo" }; std::unique_ptr<InputArgList> AL( - T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC)); + T.ParseArgs(std::begin(MyArgs), std::end(MyArgs), MAI, MAC)); EXPECT_FALSE(AL->hasArg(OPT_A)); EXPECT_FALSE(AL->hasArg(OPT_B)); } @@ -187,7 +187,7 @@ TEST(Option, SlurpEmpty) { const char *MyArgs[] = { "-A", "-slurp" }; std::unique_ptr<InputArgList> AL( - T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC)); + T.ParseArgs(std::begin(MyArgs), std::end(MyArgs), MAI, MAC)); EXPECT_TRUE(AL->hasArg(OPT_A)); EXPECT_TRUE(AL->hasArg(OPT_Slurp)); EXPECT_EQ(AL->getAllArgValues(OPT_Slurp).size(), 0U); @@ -199,7 +199,7 @@ TEST(Option, Slurp) { const char *MyArgs[] = { "-A", "-slurp", "-B", "--", "foo" }; std::unique_ptr<InputArgList> AL( - T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC)); + T.ParseArgs(std::begin(MyArgs), std::end(MyArgs), MAI, MAC)); EXPECT_EQ(AL->size(), 2U); EXPECT_TRUE(AL->hasArg(OPT_A)); EXPECT_FALSE(AL->hasArg(OPT_B)); |