Permalink
Browse files

Imported gmock 1.7.0.

  • Loading branch information...
jacobsa committed Jan 8, 2014
1 parent c1f1208 commit ee919b38798c0cdfb8090f574c023f75eefd1063
Showing with 34,471 additions and 19,162 deletions.
  1. +34 −0 third_party/gmock/CHANGES
  2. +30 −10 third_party/gmock/CMakeLists.txt
  3. 0 third_party/gmock/{COPYING → LICENSE}
  4. +20 −13 third_party/gmock/Makefile.am
  5. +118 −82 third_party/gmock/Makefile.in
  6. +24 −9 third_party/gmock/README
  7. +1,524 −864 third_party/gmock/aclocal.m4
  8. +197 −200 third_party/gmock/build-aux/config.guess
  9. +150 −70 third_party/gmock/build-aux/config.sub
  10. +66 −8 third_party/gmock/build-aux/depcomp
  11. +18 −11 third_party/gmock/build-aux/install-sh
  12. +2,632 −1,384 third_party/gmock/build-aux/ltmain.sh
  13. +4 −49 third_party/gmock/build-aux/missing
  14. +2,699 −1,959 third_party/gmock/configure
  15. +3 −3 third_party/gmock/configure.ac
  16. +1,759 −870 third_party/gmock/fused-src/gmock-gtest-all.cc
  17. +3,035 −1,659 third_party/gmock/fused-src/gmock/gmock.h
  18. +2 −2 third_party/gmock/fused-src/gmock_main.cc
  19. +1,584 −1,060 third_party/gmock/fused-src/gtest/gtest.h
  20. +27 −0 third_party/gmock/gtest/CHANGES
  21. +27 −15 third_party/gmock/gtest/CMakeLists.txt
  22. 0 third_party/gmock/gtest/{COPYING → LICENSE}
  23. +4 −0 third_party/gmock/gtest/Makefile.am
  24. +107 −76 third_party/gmock/gtest/Makefile.in
  25. +20 −9 third_party/gmock/gtest/README
  26. +61 −41 third_party/gmock/gtest/aclocal.m4
  27. +197 −200 third_party/gmock/gtest/build-aux/config.guess
  28. +150 −70 third_party/gmock/gtest/build-aux/config.sub
  29. +66 −8 third_party/gmock/gtest/build-aux/depcomp
  30. +18 −11 third_party/gmock/gtest/build-aux/install-sh
  31. +2,632 −1,384 third_party/gmock/gtest/build-aux/ltmain.sh
  32. +4 −49 third_party/gmock/gtest/build-aux/missing
  33. +12 −1 third_party/gmock/gtest/cmake/internal_utils.cmake
  34. +2,695 −1,955 third_party/gmock/gtest/configure
  35. +3 −3 third_party/gmock/gtest/configure.ac
  36. +1,250 −776 third_party/gmock/gtest/fused-src/gtest/gtest-all.cc
  37. +1,584 −1,060 third_party/gmock/gtest/fused-src/gtest/gtest.h
  38. +2 −3 third_party/gmock/gtest/fused-src/gtest/gtest_main.cc
  39. +14 −3 third_party/gmock/gtest/include/gtest/gtest-death-test.h
  40. +47 −27 third_party/gmock/gtest/include/gtest/gtest-message.h
  41. +1 −1 third_party/gmock/gtest/include/gtest/gtest-param-test.h
  42. +1 −1 third_party/gmock/gtest/include/gtest/gtest-param-test.h.pump
  43. +75 −16 third_party/gmock/gtest/include/gtest/gtest-printers.h
  44. +1 −1 third_party/gmock/gtest/include/gtest/gtest-spi.h
  45. +10 −7 third_party/gmock/gtest/include/gtest/gtest-test-part.h
  46. +220 −84 third_party/gmock/gtest/include/gtest/gtest.h
  47. +6 −6 third_party/gmock/gtest/include/gtest/gtest_pred_impl.h
  48. +16 −5 third_party/gmock/gtest/include/gtest/internal/gtest-death-test-internal.h
  49. +5 −9 third_party/gmock/gtest/include/gtest/internal/gtest-filepath.h
  50. +57 −125 third_party/gmock/gtest/include/gtest/internal/gtest-internal.h
  51. +4 −4 third_party/gmock/gtest/include/gtest/internal/gtest-linked_ptr.h
  52. +457 −136 third_party/gmock/gtest/include/gtest/internal/gtest-param-util-generated.h
  53. +1 −1 third_party/gmock/gtest/include/gtest/internal/gtest-param-util-generated.h.pump
  54. +4 −4 third_party/gmock/gtest/include/gtest/internal/gtest-param-util.h
  55. +223 −51 third_party/gmock/gtest/include/gtest/internal/gtest-port.h
  56. +17 −200 third_party/gmock/gtest/include/gtest/internal/gtest-string.h
  57. +68 −24 third_party/gmock/gtest/include/gtest/internal/gtest-tuple.h
  58. +8 −5 third_party/gmock/gtest/include/gtest/internal/gtest-tuple.h.pump
  59. +11 −10 third_party/gmock/gtest/include/gtest/internal/gtest-type-util.h
  60. +11 −10 third_party/gmock/gtest/include/gtest/internal/gtest-type-util.h.pump
  61. +1,430 −806 third_party/gmock/gtest/m4/libtool.m4
  62. +24 −8 third_party/gmock/gtest/m4/ltoptions.m4
  63. +6 −6 third_party/gmock/gtest/m4/ltversion.m4
  64. +9 −3 third_party/gmock/gtest/m4/lt~obsolete.m4
  65. +4 −2 third_party/gmock/gtest/make/Makefile
  66. +1 −2 third_party/gmock/gtest/samples/sample10_unittest.cc
  67. +1 −1 third_party/gmock/gtest/samples/sample1_unittest.cc
  68. +0 −1 third_party/gmock/gtest/samples/sample2.h
  69. +4 −4 third_party/gmock/gtest/samples/sample2_unittest.cc
  70. +3 −4 third_party/gmock/gtest/samples/sample3-inl.h
  71. +8 −8 third_party/gmock/gtest/samples/sample5_unittest.cc
  72. +2 −2 third_party/gmock/gtest/scripts/gen_gtest_pred_impl.py
  73. +1 −1 third_party/gmock/gtest/scripts/gtest-config.in
  74. +23 −15 third_party/gmock/gtest/scripts/pump.py
  75. +195 −85 third_party/gmock/gtest/src/gtest-death-test.cc
  76. +16 −14 third_party/gmock/gtest/src/gtest-filepath.cc
  77. +211 −31 third_party/gmock/gtest/src/gtest-internal-inl.h
  78. +89 −30 third_party/gmock/gtest/src/gtest-port.cc
  79. +54 −47 third_party/gmock/gtest/src/gtest-printers.cc
  80. +3 −3 third_party/gmock/gtest/src/gtest-test-part.cc
  81. +3 −3 third_party/gmock/gtest/src/gtest-typed-test.cc
  82. +679 −562 third_party/gmock/gtest/src/gtest.cc
  83. +2 −3 third_party/gmock/gtest/src/gtest_main.cc
  84. +112 −41 third_party/gmock/gtest/test/gtest-death-test_test.cc
  85. +120 −136 third_party/gmock/gtest/test/gtest-filepath_test.cc
  86. +1 −2 third_party/gmock/gtest/test/gtest-linked_ptr_test.cc
  87. +15 −18 third_party/gmock/gtest/test/gtest-listener_test.cc
  88. +24 −31 third_party/gmock/gtest/test/gtest-message_test.cc
  89. +30 −27 third_party/gmock/gtest/test/gtest-options_test.cc
  90. +11 −2 third_party/gmock/gtest/test/gtest-param-test_test.cc
  91. +4 −2 third_party/gmock/gtest/test/gtest-param-test_test.h
  92. +86 −39 third_party/gmock/gtest/test/gtest-port_test.cc
  93. +275 −16 third_party/gmock/gtest/test/gtest-printers_test.cc
  94. +9 −15 third_party/gmock/gtest/test/gtest_break_on_failure_unittest.py
  95. +29 −12 third_party/gmock/gtest/test/gtest_catch_exceptions_test.py
  96. +3 −0 third_party/gmock/gtest/test/gtest_catch_exceptions_test_.cc
  97. +1 −0 third_party/gmock/gtest/test/gtest_environment_test.cc
  98. +61 −31 third_party/gmock/gtest/test/gtest_list_tests_unittest.py
  99. +75 −3 third_party/gmock/gtest/test/gtest_list_tests_unittest_.cc
  100. +0 −1 third_party/gmock/gtest/test/gtest_no_test_unittest.cc
  101. +22 −8 third_party/gmock/gtest/test/gtest_output_test_.cc
  102. +18 −9 third_party/gmock/gtest/test/gtest_output_test_golden_lin.txt
  103. +1 −1 third_party/gmock/gtest/test/gtest_pred_impl_unittest.cc
  104. +141 −0 third_party/gmock/gtest/test/gtest_premature_exit_test.cc
  105. +1 −1 third_party/gmock/gtest/test/gtest_repeat_test.cc
  106. +0 −1 third_party/gmock/gtest/test/gtest_shuffle_test_.cc
  107. +2 −3 third_party/gmock/gtest/test/gtest_stress_test.cc
  108. +16 −1 third_party/gmock/gtest/test/gtest_test_utils.py
  109. +17 −1 third_party/gmock/gtest/test/gtest_throw_on_failure_test_.cc
  110. +545 −467 third_party/gmock/gtest/test/gtest_unittest.cc
  111. +2 −2 third_party/gmock/gtest/test/gtest_xml_outfiles_test.py
  112. +107 −42 third_party/gmock/gtest/test/gtest_xml_output_unittest.py
  113. +13 −6 third_party/gmock/gtest/test/gtest_xml_output_unittest_.cc
  114. +44 −29 third_party/gmock/gtest/test/gtest_xml_test_utils.py
  115. +58 −7 third_party/gmock/gtest/xcode/gtest.xcodeproj/project.pbxproj
  116. +5 −3 third_party/gmock/include/gmock/gmock-actions.h
  117. +7 −6 third_party/gmock/include/gmock/gmock-cardinalities.h
  118. +13 −17 third_party/gmock/include/gmock/gmock-generated-actions.h
  119. +4 −8 third_party/gmock/include/gmock/gmock-generated-actions.h.pump
  120. +363 −301 third_party/gmock/include/gmock/gmock-generated-function-mockers.h
  121. +34 −27 third_party/gmock/include/gmock/gmock-generated-function-mockers.h.pump
  122. +677 −541 third_party/gmock/include/gmock/gmock-generated-matchers.h
  123. +117 −94 third_party/gmock/include/gmock/gmock-generated-matchers.h.pump
  124. +140 −17 third_party/gmock/include/gmock/gmock-generated-nice-strict.h
  125. +59 −58 third_party/gmock/include/gmock/gmock-generated-nice-strict.h.pump
  126. +1,132 −212 third_party/gmock/include/gmock/gmock-matchers.h
  127. +58 −0 third_party/gmock/include/gmock/gmock-more-matchers.h
  128. +178 −136 third_party/gmock/include/gmock/gmock-spec-builders.h
  129. +5 −4 third_party/gmock/include/gmock/gmock.h
  130. +4 −2 third_party/gmock/include/gmock/internal/gmock-generated-internal-utils.h
  131. +1 −1 third_party/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump
  132. +46 −11 third_party/gmock/include/gmock/internal/gmock-internal-utils.h
  133. +6 −6 third_party/gmock/include/gmock/internal/gmock-port.h
  134. +5 −2 third_party/gmock/make/Makefile
  135. 0 third_party/gmock/scripts/generator/{COPYING → LICENSE}
  136. +1 −1 third_party/gmock/scripts/generator/cpp/ast.py
  137. +47 −13 third_party/gmock/scripts/generator/cpp/gmock_class.py
  138. +7 −6 third_party/gmock/src/gmock-cardinalities.cc
  139. +10 −9 third_party/gmock/src/gmock-internal-utils.cc
  140. +400 −3 third_party/gmock/src/gmock-matchers.cc
  141. +87 −71 third_party/gmock/src/gmock-spec-builders.cc
  142. +5 −5 third_party/gmock/src/gmock.cc
  143. +2 −2 third_party/gmock/src/gmock_main.cc
  144. +22 −71 third_party/gmock/test/gmock-actions_test.cc
  145. +14 −1 third_party/gmock/test/gmock-generated-actions_test.cc
  146. +54 −6 third_party/gmock/test/gmock-generated-function-mockers_test.cc
  147. +166 −4 third_party/gmock/test/gmock-generated-matchers_test.cc
  148. +23 −29 third_party/gmock/test/gmock-internal-utils_test.cc
  149. +1,301 −94 third_party/gmock/test/gmock-matchers_test.cc
  150. +2 −1 third_party/gmock/test/gmock-more-actions_test.cc
  151. +148 −8 third_party/gmock/test/gmock-nice-strict_test.cc
  152. +262 −133 third_party/gmock/test/gmock-spec-builders_test.cc
  153. +78 −0 third_party/gmock/test/gmock_ex_test.cc
  154. +26 −8 third_party/gmock/test/gmock_leak_test.py
  155. +8 −8 third_party/gmock/test/gmock_link_test.h
  156. +2 −1 third_party/gmock/test/gmock_output_test_.cc
  157. +322 −0 third_party/gmock/test/gmock_stress_test.cc
  158. +4 −3 third_party/gmock/test/gmock_test_utils.py
View
@@ -1,3 +1,37 @@
+Changes for 1.7.0:
+
+* All new improvements in Google Test 1.7.0.
+* New feature: matchers DoubleNear(), FloatNear(),
+ NanSensitiveDoubleNear(), NanSensitiveFloatNear(),
+ UnorderedElementsAre(), UnorderedElementsAreArray(), WhenSorted(),
+ WhenSortedBy(), IsEmpty(), and SizeIs().
+* Improvement: Google Mock can now be built as a DLL.
+* Improvement: when compiled by a C++11 compiler, matchers AllOf()
+ and AnyOf() can accept an arbitrary number of matchers.
+* Improvement: when compiled by a C++11 compiler, matchers
+ ElementsAreArray() can accept an initializer list.
+* Improvement: when exceptions are enabled, a mock method with no
+ default action now throws instead crashing the test.
+* Improvement: added class testing::StringMatchResultListener to aid
+ definition of composite matchers.
+* Improvement: function return types used in MOCK_METHOD*() macros can
+ now contain unprotected commas.
+* Improvement (potentially breaking): EXPECT_THAT() and ASSERT_THAT()
+ are now more strict in ensuring that the value type and the matcher
+ type are compatible, catching potential bugs in tests.
+* Improvement: Pointee() now works on an optional<T>.
+* Improvement: the ElementsAreArray() matcher can now take a vector or
+ iterator range as input, and makes a copy of its input elements
+ before the conversion to a Matcher.
+* Improvement: the Google Mock Generator can now generate mocks for
+ some class templates.
+* Bug fix: mock object destruction triggerred by another mock object's
+ destruction no longer hangs.
+* Improvement: Google Mock Doctor works better with newer Clang and
+ GCC now.
+* Compatibility fixes.
+* Bug/warning fixes.
+
Changes for 1.6.0:
* Compilation is much faster and uses much less memory, especially
@@ -9,11 +9,6 @@
# make it prominent in the GUI.
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
-# Forces BUILD_SHARED_LIBS to OFF as Google Mock currently does not support
-# working in a DLL.
-# TODO(vladl@google.com): Implement building gMock as a DLL.
-set(BUILD_SHARED_LIBS OFF)
-
option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
# A directory to find Google Test sources.
@@ -76,11 +71,16 @@ include_directories("${gmock_SOURCE_DIR}/include"
# Google Mock libraries. We build them using more strict warnings than what
# are used for other targets, to ensure that Google Mock can be compiled by
# a user aggressive about warnings.
-cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
-target_link_libraries(gmock gtest)
+cxx_library(gmock
+ "${cxx_strict}"
+ "${gtest_dir}/src/gtest-all.cc"
+ src/gmock-all.cc)
-cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
-target_link_libraries(gmock_main gmock)
+cxx_library(gmock_main
+ "${cxx_strict}"
+ "${gtest_dir}/src/gtest-all.cc"
+ src/gmock-all.cc
+ src/gmock_main.cc)
########################################################################
#
@@ -103,6 +103,7 @@ if (gmock_build_tests)
cxx_test(gmock-actions_test gmock_main)
cxx_test(gmock-cardinalities_test gmock_main)
+ cxx_test(gmock_ex_test gmock_main)
cxx_test(gmock-generated-actions_test gmock_main)
cxx_test(gmock-generated-function-mockers_test gmock_main)
cxx_test(gmock-generated-internal-utils_test gmock_main)
@@ -114,9 +115,12 @@ if (gmock_build_tests)
cxx_test(gmock-port_test gmock_main)
cxx_test(gmock-spec-builders_test gmock_main)
cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc)
- # cxx_test(gmock_stress_test gmock)
cxx_test(gmock_test gmock_main)
+ if (CMAKE_USE_PTHREADS_INIT)
+ cxx_test(gmock_stress_test gmock)
+ endif()
+
# gmock_all_test is commented to save time building and running tests.
# Uncomment if necessary.
# cxx_test(gmock_all_test gmock_main)
@@ -126,8 +130,10 @@ if (gmock_build_tests)
cxx_library(gmock_main_no_exception "${cxx_no_exception}"
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
+
cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
+
cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}"
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
@@ -140,6 +146,20 @@ if (gmock_build_tests)
cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}"
gmock_main_use_own_tuple test/gmock-spec-builders_test.cc)
+ cxx_shared_library(shared_gmock_main "${cxx_default}"
+ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
+
+ # Tests that a binary can be built with Google Mock as a shared library. On
+ # some system configurations, it may not possible to run the binary without
+ # knowing more details about the system configurations. We do not try to run
+ # this binary. To get a more robust shared library coverage, configure with
+ # -DBUILD_SHARED_LIBS=ON.
+ cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}"
+ shared_gmock_main test/gmock-spec-builders_test.cc)
+ set_target_properties(shared_gmock_test_
+ PROPERTIES
+ COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
+
############################################################
# Python tests.
File renamed without changes.
@@ -1,7 +1,7 @@
# Automake file
# Nonstandard package files for distribution.
-EXTRA_DIST =
+EXTRA_DIST = LICENSE
# We may need to build our internally packaged gtest. If so, it will be
# included in the 'subdirs' variable.
@@ -34,6 +34,7 @@ pkginclude_HEADERS = \
include/gmock/gmock-generated-nice-strict.h \
include/gmock/gmock-matchers.h \
include/gmock/gmock-more-actions.h \
+ include/gmock/gmock-more-matchers.h \
include/gmock/gmock-spec-builders.h \
include/gmock/gmock.h
@@ -73,16 +74,18 @@ test_gmock_link_test_SOURCES = \
test/gmock_link_test.h
test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la lib/libgmock.la
-# Tests that fused gmock files compile and work.
-TESTS += test/gmock_fused_test
-check_PROGRAMS += test/gmock_fused_test
-test_gmock_fused_test_SOURCES = \
- fused-src/gmock-gtest-all.cc \
- fused-src/gmock/gmock.h \
- fused-src/gmock_main.cc \
- fused-src/gtest/gtest.h \
- test/gmock_test.cc
-test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
+if HAVE_PYTHON
+ # Tests that fused gmock files compile and work.
+ TESTS += test/gmock_fused_test
+ check_PROGRAMS += test/gmock_fused_test
+ test_gmock_fused_test_SOURCES = \
+ fused-src/gmock-gtest-all.cc \
+ fused-src/gmock/gmock.h \
+ fused-src/gmock_main.cc \
+ fused-src/gtest/gtest.h \
+ test/gmock_test.cc
+ test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
+endif
# Google Mock source files that we don't compile directly.
GMOCK_SOURCE_INGLUDES = \
@@ -97,7 +100,9 @@ EXTRA_DIST += $(GMOCK_SOURCE_INGLUDES)
# C++ tests that we don't compile using autotools.
EXTRA_DIST += \
test/gmock-actions_test.cc \
+ test/gmock_all_test.cc \
test/gmock-cardinalities_test.cc \
+ test/gmock_ex_test.cc \
test/gmock-generated-actions_test.cc \
test/gmock-generated-function-mockers_test.cc \
test/gmock-generated-internal-utils_test.cc \
@@ -107,7 +112,7 @@ EXTRA_DIST += \
test/gmock-more-actions_test.cc \
test/gmock-nice-strict_test.cc \
test/gmock-port_test.cc \
- test/gmock_all_test.cc
+ test/gmock_stress_test.cc
# Python tests, which we don't run using autotools.
EXTRA_DIST += \
@@ -138,7 +143,7 @@ EXTRA_DIST += scripts/fuse_gmock_files.py
# The Google Mock Generator tool from the cppclean project.
EXTRA_DIST += \
- scripts/generator/COPYING \
+ scripts/generator/LICENSE \
scripts/generator/README \
scripts/generator/README.cppclean \
scripts/generator/cpp/__init__.py \
@@ -169,6 +174,7 @@ EXTRA_DIST += \
msvc/2010/gmock_main.vcxproj \
msvc/2010/gmock_test.vcxproj
+if HAVE_PYTHON
# gmock_test.cc does not really depend on files generated by the
# fused-gmock-internal rule. However, gmock_test.o does, and it is
# important to include test/gmock_test.cc as part of this rule in order to
@@ -191,6 +197,7 @@ fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
maintainer-clean-local:
rm -rf "$(srcdir)/fused-src"
+endif
# Death tests may produce core dumps in the build directory. In case
# this happens, clean them to keep distcleancheck happy.
Oops, something went wrong.

0 comments on commit ee919b3

Please sign in to comment.