From 8d0d13752ed33d8a22572dce9e063992d92d0556 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 6 Nov 2017 09:29:09 +0000 Subject: [PATCH] [Tooling] Test internal::createExecutorFromCommandLineArgsImpl instead of the wrapper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317466 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Tooling/ExecutionTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unittests/Tooling/ExecutionTest.cpp b/unittests/Tooling/ExecutionTest.cpp index 09dfdb6cf0..b0c16d6cc5 100644 --- a/unittests/Tooling/ExecutionTest.cpp +++ b/unittests/Tooling/ExecutionTest.cpp @@ -133,8 +133,8 @@ llvm::cl::OptionCategory TestCategory("execution-test options"); TEST(CreateToolExecutorTest, FailedCreateExecutorUndefinedFlag) { std::vector argv = {"prog", "--fake_flag_no_no_no", "f"}; int argc = argv.size(); - auto Executor = - createExecutorFromCommandLineArgs(argc, &argv[0], TestCategory); + auto Executor = internal::createExecutorFromCommandLineArgsImpl( + argc, &argv[0], TestCategory); ASSERT_FALSE((bool)Executor); llvm::consumeError(Executor.takeError()); } @@ -148,8 +148,8 @@ TEST(CreateToolExecutorTest, RegisterFlagsBeforeReset) { std::vector argv = {"prog", "--before_reset=set", "f"}; int argc = argv.size(); - auto Executor = - createExecutorFromCommandLineArgs(argc, &argv[0], TestCategory); + auto Executor = internal::createExecutorFromCommandLineArgsImpl( + argc, &argv[0], TestCategory); ASSERT_TRUE((bool)Executor); EXPECT_EQ(BeforeReset, "set"); BeforeReset.removeArgument(); @@ -158,8 +158,8 @@ TEST(CreateToolExecutorTest, RegisterFlagsBeforeReset) { TEST(CreateToolExecutorTest, CreateStandaloneToolExecutor) { std::vector argv = {"prog", "standalone.cpp"}; int argc = argv.size(); - auto Executor = - createExecutorFromCommandLineArgs(argc, &argv[0], TestCategory); + auto Executor = internal::createExecutorFromCommandLineArgsImpl( + argc, &argv[0], TestCategory); ASSERT_TRUE((bool)Executor); EXPECT_EQ(Executor->get()->getExecutorName(), StandaloneToolExecutor::ExecutorName); @@ -169,8 +169,8 @@ TEST(CreateToolExecutorTest, CreateTestToolExecutor) { std::vector argv = {"prog", "test.cpp", "--executor=test-executor"}; int argc = argv.size(); - auto Executor = - createExecutorFromCommandLineArgs(argc, &argv[0], TestCategory); + auto Executor = internal::createExecutorFromCommandLineArgsImpl( + argc, &argv[0], TestCategory); ASSERT_TRUE((bool)Executor); EXPECT_EQ(Executor->get()->getExecutorName(), TestToolExecutor::ExecutorName); } -- 2.50.1