diff options
author | jgm <jgm@google.com> | 2012-11-15 15:47:38 (GMT) |
---|---|---|
committer | jgm <jgm@google.com> | 2012-11-15 15:47:38 (GMT) |
commit | 87fdda2cf24d953f3cbec1e0c266b2db9928f406 (patch) | |
tree | 640cd727bab672105c57f563091dc58b7a81a1be /include/gtest/internal/gtest-death-test-internal.h | |
parent | 78bf6d5724e733cce313228856e18d5c372b4fb3 (diff) | |
download | googletest-87fdda2cf24d953f3cbec1e0c266b2db9928f406.zip googletest-87fdda2cf24d953f3cbec1e0c266b2db9928f406.tar.gz googletest-87fdda2cf24d953f3cbec1e0c266b2db9928f406.tar.bz2 |
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.
Diffstat (limited to 'include/gtest/internal/gtest-death-test-internal.h')
-rw-r--r-- | include/gtest/internal/gtest-death-test-internal.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/gtest/internal/gtest-death-test-internal.h b/include/gtest/internal/gtest-death-test-internal.h index 22bb97f..2b3a78f 100644 --- a/include/gtest/internal/gtest-death-test-internal.h +++ b/include/gtest/internal/gtest-death-test-internal.h @@ -127,11 +127,11 @@ class GTEST_API_ DeathTest { // the last death test. static const char* LastMessage(); - static void set_last_death_test_message(const String& message); + static void set_last_death_test_message(const std::string& message); private: // A string containing a description of the outcome of the last death test. - static String last_death_test_message_; + static std::string last_death_test_message_; GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); }; @@ -233,7 +233,7 @@ GTEST_API_ bool ExitedUnsuccessfully(int exit_status); // RUN_ALL_TESTS was called. class InternalRunDeathTestFlag { public: - InternalRunDeathTestFlag(const String& a_file, + InternalRunDeathTestFlag(const std::string& a_file, int a_line, int an_index, int a_write_fd) @@ -245,13 +245,13 @@ class InternalRunDeathTestFlag { posix::Close(write_fd_); } - String file() const { return file_; } + const std::string& file() const { return file_; } int line() const { return line_; } int index() const { return index_; } int write_fd() const { return write_fd_; } private: - String file_; + std::string file_; int line_; int index_; int write_fd_; |