summaryrefslogtreecommitdiff
path: root/src/gtest-death-test.cc
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-10-05 05:51:10 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-10-05 05:51:10 +0000
commite35019652516ad3b4e9bd8c49dbcfca9d443d7e4 (patch)
treef5bc8a2924ea70d5edf2cfb2bbd39c02bf0c8d68 /src/gtest-death-test.cc
parent5f4d53c8ef453c82f87095711dd072370d496c0b (diff)
downloadgtest-e35019652516ad3b4e9bd8c49dbcfca9d443d7e4.tar.gz
gtest-e35019652516ad3b4e9bd8c49dbcfca9d443d7e4.tar.bz2
gtest-e35019652516ad3b4e9bd8c49dbcfca9d443d7e4.tar.xz
Adds ability to inject death test child arguments for test purposes.
git-svn-id: http://googletest.googlecode.com/svn/trunk@599 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-death-test.cc')
-rw-r--r--src/gtest-death-test.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc
index 2f0b0e3..76aa168 100644
--- a/src/gtest-death-test.cc
+++ b/src/gtest-death-test.cc
@@ -844,6 +844,11 @@ class ExecDeathTest : public ForkingDeathTest {
ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }
virtual TestRole AssumeRole();
private:
+ static ::std::vector<testing::internal::string>
+ GetArgvsForDeathTestChildProcess() {
+ ::std::vector<testing::internal::string> args = GetInjectableArgvs();
+ return args;
+ }
// The name of the file in which the death test is located.
const char* const file_;
// The line number on which the death test is located.
@@ -1082,7 +1087,7 @@ DeathTest::TestRole ExecDeathTest::AssumeRole() {
GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag,
file_, line_, death_test_index, pipe_fd[1]);
Arguments args;
- args.AddArguments(GetArgvs());
+ args.AddArguments(GetArgvsForDeathTestChildProcess());
args.AddArgument(filter_flag.c_str());
args.AddArgument(internal_flag.c_str());