summaryrefslogtreecommitdiff
path: root/src/gtest-typed-test.cc
diff options
context:
space:
mode:
authorjgm@google.com <jgm@google.com@861a406c-534a-0410-8894-cb66d6ee9925>2012-11-15 15:47:38 +0000
committerjgm@google.com <jgm@google.com@861a406c-534a-0410-8894-cb66d6ee9925>2012-11-15 15:47:38 +0000
commit03c314931649a999b0cf5deb0a434a1009157416 (patch)
tree640cd727bab672105c57f563091dc58b7a81a1be /src/gtest-typed-test.cc
parent5d9f11fe81eaca3989ec7e8dbfe5b31608a75121 (diff)
downloadgtest-03c314931649a999b0cf5deb0a434a1009157416.tar.gz
gtest-03c314931649a999b0cf5deb0a434a1009157416.tar.bz2
gtest-03c314931649a999b0cf5deb0a434a1009157416.tar.xz
Unfortunately, the svn repo is a bit out of date. This commit contains 8
changes that haven't made it to svn. The descriptions of each change are listed below. - Fixes some python shebang lines. - Add ElementsAreArray overloads to gmock. ElementsAreArray now makes a copy of its input elements before the conversion to a Matcher. ElementsAreArray can now take a vector as input. ElementsAreArray can now take an iterator pair as input. - Templatize MatchAndExplain to allow independent string types for the matcher and matchee. I also templatized the ConstCharPointer version of MatchAndExplain to avoid calls with "char*" from using the new templated MatchAndExplain. - Fixes the bug where the constructor of the return type of ElementsAre() saves a reference instead of a copy of the arguments. - Extends ElementsAre() to accept arrays whose sizes aren't known. - Switches gTest's internal FilePath class from testing::internal::String to std::string. testing::internal::String was introduced when gTest couldn't depend on std::string. It's now deprecated. - Switches gTest & gMock from using testing::internal::String objects to std::string. Some static methods of String are still in use. We may be able to remove some but not all of them. In particular, String::Format() should eventually be removed as it truncates the result at 4096 characters, often causing problems. git-svn-id: http://googletest.googlecode.com/svn/trunk@628 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-typed-test.cc')
-rw-r--r--src/gtest-typed-test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gtest-typed-test.cc b/src/gtest-typed-test.cc
index a5cc88f..f0079f4 100644
--- a/src/gtest-typed-test.cc
+++ b/src/gtest-typed-test.cc
@@ -58,10 +58,10 @@ const char* TypedTestCasePState::VerifyRegisteredTestNames(
registered_tests = SkipSpaces(registered_tests);
Message errors;
- ::std::set<String> tests;
+ ::std::set<std::string> tests;
for (const char* names = registered_tests; names != NULL;
names = SkipComma(names)) {
- const String name = GetPrefixUntilComma(names);
+ const std::string name = GetPrefixUntilComma(names);
if (tests.count(name) != 0) {
errors << "Test " << name << " is listed more than once.\n";
continue;
@@ -93,7 +93,7 @@ const char* TypedTestCasePState::VerifyRegisteredTestNames(
}
}
- const String& errors_str = errors.GetString();
+ const std::string& errors_str = errors.GetString();
if (errors_str != "") {
fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
errors_str.c_str());