Author: ioeric Date: Mon Nov 6 01:29:09 2017 New Revision: 317466 URL: http://llvm.org/viewvc/llvm-project?rev=317466&view=rev Log: [Tooling] Test internal::createExecutorFromCommandLineArgsImpl instead of the wrapper.
Modified: cfe/trunk/unittests/Tooling/ExecutionTest.cpp Modified: cfe/trunk/unittests/Tooling/ExecutionTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/ExecutionTest.cpp?rev=317466&r1=317465&r2=317466&view=diff ============================================================================== --- cfe/trunk/unittests/Tooling/ExecutionTest.cpp (original) +++ cfe/trunk/unittests/Tooling/ExecutionTest.cpp Mon Nov 6 01:29:09 2017 @@ -133,8 +133,8 @@ llvm::cl::OptionCategory TestCategory("e TEST(CreateToolExecutorTest, FailedCreateExecutorUndefinedFlag) { std::vector<const char *> 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, RegisterFla std::vector<const char *> 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, RegisterFla TEST(CreateToolExecutorTest, CreateStandaloneToolExecutor) { std::vector<const char *> 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, CreateTestT std::vector<const char *> 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); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits