summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-param-util.h
diff options
context:
space:
mode:
authorNINI1988 <nini16041988-gitbucket@yahoo.de>2020-02-21 16:51:29 (GMT)
committerNINI1988 <nini16041988-gitbucket@yahoo.de>2020-02-21 16:51:29 (GMT)
commitff4872659a5ef73012e197d6507f7eb76b888cff (patch)
tree42c438350479e7479da91f248d6b782d36dd12ec /googletest/include/gtest/internal/gtest-param-util.h
parent25385c23e9a972fe1f12d3e4ba42b648c19ea1b4 (diff)
downloadgoogletest-ff4872659a5ef73012e197d6507f7eb76b888cff.zip
googletest-ff4872659a5ef73012e197d6507f7eb76b888cff.tar.gz
googletest-ff4872659a5ef73012e197d6507f7eb76b888cff.tar.bz2
Add missing call for gtest_list_output_unittest_ unitTest.refs/pull/2718/head
Add unitTest for fixed TEST_P line number. Use CodeLocation TestInfo struct.
Diffstat (limited to 'googletest/include/gtest/internal/gtest-param-util.h')
-rw-r--r--googletest/include/gtest/internal/gtest-param-util.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h
index dfc3018..2b8b272 100644
--- a/googletest/include/gtest/internal/gtest-param-util.h
+++ b/googletest/include/gtest/internal/gtest-param-util.h
@@ -520,9 +520,9 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
// parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
// test suite base name and DoBar is test base name.
void AddTestPattern(const char* test_suite_name, const char* test_base_name,
- TestMetaFactoryBase<ParamType>* meta_factory, int line) {
+ TestMetaFactoryBase<ParamType>* meta_factory, CodeLocation code_location) {
tests_.push_back(std::shared_ptr<TestInfo>(
- new TestInfo(test_suite_name, test_base_name, meta_factory, line)));
+ new TestInfo(test_suite_name, test_base_name, meta_factory, code_location)));
}
// INSTANTIATE_TEST_SUITE_P macro uses AddGenerator() to record information
// about a generator.
@@ -589,7 +589,7 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
MakeAndRegisterTestInfo(
test_suite_name.c_str(), test_name_stream.GetString().c_str(),
nullptr, // No type parameter.
- PrintToString(*param_it).c_str(), CodeLocation(code_location_.file, test_info->line),
+ PrintToString(*param_it).c_str(), test_info->code_location,
GetTestSuiteTypeId(),
SuiteApiResolver<TestSuite>::GetSetUpCaseOrSuite(file, line),
SuiteApiResolver<TestSuite>::GetTearDownCaseOrSuite(file, line),
@@ -610,16 +610,16 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
// with TEST_P macro.
struct TestInfo {
TestInfo(const char* a_test_suite_base_name, const char* a_test_base_name,
- TestMetaFactoryBase<ParamType>* a_test_meta_factory, int a_line)
+ TestMetaFactoryBase<ParamType>* a_test_meta_factory, CodeLocation a_code_location)
: test_suite_base_name(a_test_suite_base_name),
test_base_name(a_test_base_name),
test_meta_factory(a_test_meta_factory),
- line(a_line) {}
+ code_location(a_code_location) {}
const std::string test_suite_base_name;
const std::string test_base_name;
const std::unique_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
- const int line;
+ const CodeLocation code_location;
};
using TestInfoContainer = ::std::vector<std::shared_ptr<TestInfo> >;
// Records data received from INSTANTIATE_TEST_SUITE_P macros: