aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerry Turcios <jerryturcios08@gmail.com>2018-10-04 07:41:43 -0400
committerJerry Turcios <jerryturcios08@gmail.com>2018-10-04 07:41:43 -0400
commit50ec6ee33c79e79286988b6c50b8c415326f953b (patch)
treeea578825f774df9c2c827a7450cbd34327193c2b
parent9f8512d7c53df3bfb6668aa5ee503b11380ae62b (diff)
parentbea3d619757e6844a11b4f7c2f85ee05b73abd41 (diff)
downloadgoogletest-50ec6ee33c79e79286988b6c50b8c415326f953b.tar.gz
googletest-50ec6ee33c79e79286988b6c50b8c415326f953b.tar.bz2
googletest-50ec6ee33c79e79286988b6c50b8c415326f953b.zip
Merge branch 'master' of https://github.com/google/googletest
-rw-r--r--googletest/include/gtest/gtest.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 89214183..ba99737c 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -1815,11 +1815,8 @@ class WithParamInterface {
virtual ~WithParamInterface() {}
// The current parameter value. Is also available in the test fixture's
- // constructor. This member function is non-static, even though it only
- // references static data, to reduce the opportunity for incorrect uses
- // like writing 'WithParamInterface<bool>::GetParam()' for a test that
- // uses a fixture whose parameter type is int.
- const ParamType& GetParam() const {
+ // constructor.
+ static const ParamType& GetParam() {
GTEST_CHECK_(parameter_ != NULL)
<< "GetParam() can only be called inside a value-parameterized test "
<< "-- did you intend to write TEST_P instead of TEST_F?";