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.
This commit is contained in:
jgm
2012-11-15 15:47:38 +00:00
parent 78bf6d5724
commit 87fdda2cf2
28 changed files with 533 additions and 1090 deletions

View File

@@ -58,7 +58,6 @@ using testing::internal::ThreadWithParam;
#endif
namespace posix = ::testing::internal::posix;
using testing::internal::String;
using testing::internal::scoped_ptr;
// Tests catching fatal failures.
@@ -1005,7 +1004,8 @@ int main(int argc, char **argv) {
// for it.
testing::InitGoogleTest(&argc, argv);
if (argc >= 2 &&
String(argv[1]) == "--gtest_internal_skip_environment_and_ad_hoc_tests")
(std::string(argv[1]) ==
"--gtest_internal_skip_environment_and_ad_hoc_tests"))
GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests) = true;
#if GTEST_HAS_DEATH_TEST