summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-param-util.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2017-05-15 21:07:03 (GMT)
committerNico Weber <thakis@chromium.org>2017-05-15 21:53:04 (GMT)
commit09fd5b3ebfaac10b78bda664ec7f57fac74ef214 (patch)
tree89a7afc9280b7e42b96391ea2b42075446503e0f /googletest/include/gtest/internal/gtest-param-util.h
parent294f72bc773c92410aa3c5ecdd6cd4a757c3fbf4 (diff)
downloadgoogletest-09fd5b3ebfaac10b78bda664ec7f57fac74ef214.zip
googletest-09fd5b3ebfaac10b78bda664ec7f57fac74ef214.tar.gz
googletest-09fd5b3ebfaac10b78bda664ec7f57fac74ef214.tar.bz2
Use std::string and ::string explicitly in gtest and gmock code.refs/pull/1089/head
This merges a Google-internal change (117235625). Original CL description: This CL was created manually in about an hour with sed, a Python script to find all the places unqualified 'string' was mentioned, and some help from Emacs to add the "std::" qualifications, plus a few manual tweaks.
Diffstat (limited to 'googletest/include/gtest/internal/gtest-param-util.h')
-rw-r--r--googletest/include/gtest/internal/gtest-param-util.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h
index 82cab9b..3142f74 100644
--- a/googletest/include/gtest/internal/gtest-param-util.h
+++ b/googletest/include/gtest/internal/gtest-param-util.h
@@ -472,7 +472,7 @@ class ParameterizedTestCaseInfoBase {
virtual ~ParameterizedTestCaseInfoBase() {}
// Base part of test case name for display purposes.
- virtual const string& GetTestCaseName() const = 0;
+ virtual const std::string& GetTestCaseName() const = 0;
// Test case id to verify identity.
virtual TypeId GetTestCaseTypeId() const = 0;
// UnitTest class invokes this method to register tests in this
@@ -511,7 +511,7 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
: test_case_name_(name), code_location_(code_location) {}
// Test case base name for display purposes.
- virtual const string& GetTestCaseName() const { return test_case_name_; }
+ virtual const std::string& GetTestCaseName() const { return test_case_name_; }
// Test case id to verify identity.
virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
// TEST_P macro uses AddTestPattern() to record information
@@ -529,11 +529,10 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
}
// INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
// about a generator.
- int AddTestCaseInstantiation(const string& instantiation_name,
+ int AddTestCaseInstantiation(const std::string& instantiation_name,
GeneratorCreationFunc* func,
ParamNameGeneratorFunc* name_func,
- const char* file,
- int line) {
+ const char* file, int line) {
instantiations_.push_back(
InstantiationInfo(instantiation_name, func, name_func, file, line));
return 0; // Return value used only to run this method in namespace scope.
@@ -550,13 +549,13 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
for (typename InstantiationContainer::iterator gen_it =
instantiations_.begin(); gen_it != instantiations_.end();
++gen_it) {
- const string& instantiation_name = gen_it->name;
+ const std::string& instantiation_name = gen_it->name;
ParamGenerator<ParamType> generator((*gen_it->generator)());
ParamNameGeneratorFunc* name_func = gen_it->name_func;
const char* file = gen_it->file;
int line = gen_it->line;
- string test_case_name;
+ std::string test_case_name;
if ( !instantiation_name.empty() )
test_case_name = instantiation_name + "/";
test_case_name += test_info->test_case_base_name;
@@ -609,8 +608,8 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
test_base_name(a_test_base_name),
test_meta_factory(a_test_meta_factory) {}
- const string test_case_base_name;
- const string test_base_name;
+ const std::string test_case_base_name;
+ const std::string test_base_name;
const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
};
typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
@@ -651,7 +650,7 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
return true;
}
- const string test_case_name_;
+ const std::string test_case_name_;
CodeLocation code_location_;
TestInfoContainer tests_;
InstantiationContainer instantiations_;