diff options
author | David L. Jones <dlj@google.com> | 2017-11-15 01:40:05 +0000 |
---|---|---|
committer | David L. Jones <dlj@google.com> | 2017-11-15 01:40:05 +0000 |
commit | fdfce82b87b73e18577d493e84bdabe2585b95d0 (patch) | |
tree | e8d9290e273dba03920bf15a8c7742fcf5ed0b87 /unittests/Tooling/ExecutionTest.cpp | |
parent | 41af1698c520ea38edf83e7c91f1e519d34f20c1 (diff) | |
parent | a7540887e8b5cb34ee28c12bef863bad85c65b6f (diff) | |
download | clang-google/testing.tar.gz |
Creating branches/google/testing and tags/google/testing/2017-11-14 from r317716google/testing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/testing@318248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling/ExecutionTest.cpp')
-rw-r--r-- | unittests/Tooling/ExecutionTest.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/unittests/Tooling/ExecutionTest.cpp b/unittests/Tooling/ExecutionTest.cpp index 44e37b4009..b0c16d6cc5 100644 --- a/unittests/Tooling/ExecutionTest.cpp +++ b/unittests/Tooling/ExecutionTest.cpp @@ -125,13 +125,6 @@ public: } }; -// This anchor is used to force the linker to link in the generated object file -// and thus register the plugin. -extern volatile int ToolExecutorPluginAnchorSource; - -static int LLVM_ATTRIBUTE_UNUSED TestToolExecutorPluginAnchorDest = - ToolExecutorPluginAnchorSource; - static ToolExecutorPluginRegistry::Add<TestToolExecutorPlugin> X("test-executor", "Plugin for TestToolExecutor."); @@ -140,8 +133,8 @@ llvm::cl::OptionCategory TestCategory("execution-test options"); 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()); } @@ -155,8 +148,8 @@ TEST(CreateToolExecutorTest, RegisterFlagsBeforeReset) { 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(); @@ -165,8 +158,8 @@ TEST(CreateToolExecutorTest, RegisterFlagsBeforeReset) { 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); @@ -176,8 +169,8 @@ TEST(CreateToolExecutorTest, CreateTestToolExecutor) { 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); } |