Adds threading support (by Vlad Losev); updates the version number (by Zhanyong Wan); adds release notes for 1.5.0 (by Vlad Losev).
This commit is contained in:
parent
470df42bad
commit
5905ba00fe
24
CHANGES
24
CHANGES
@ -1,3 +1,27 @@
|
|||||||
|
Changes for 1.5.0:
|
||||||
|
|
||||||
|
* Support for use in multi-threaded tests on platforms having pthreads
|
||||||
|
(by virtue of the Google Test thread change)
|
||||||
|
* The new matcher API lets user-defined matchers generate custom
|
||||||
|
explanations more directly and efficiently.
|
||||||
|
* Better expectation failure messages.
|
||||||
|
* NotNull() and IsNull() now work with smart pointers.
|
||||||
|
* Field() and Property() now work when the matcher argument is a pointer
|
||||||
|
passed by reference.
|
||||||
|
* Regular expression matching on all platforms.
|
||||||
|
* Added GCC 4.0 support for Google Mock Doctor.
|
||||||
|
* Added gmock_all_test.cc for compiling most Google Mock tests
|
||||||
|
in a single file.
|
||||||
|
* Significantly cleaned up compiler warnings.
|
||||||
|
* Bug fixes, better test coverage, and implementation clean-ups.
|
||||||
|
|
||||||
|
Potentially breaking changes:
|
||||||
|
|
||||||
|
* Custom matchers defined using MatcherInterface or MakePolymorphicMatcher()
|
||||||
|
need to be updated after upgrading to Google Mock 1.5.0; matchers defined
|
||||||
|
using MATCHER or MATCHER_P* aren't affected.
|
||||||
|
* Dropped support for 'make install'.
|
||||||
|
|
||||||
Changes for 1.4.0 (we skipped 1.2.* and 1.3.* to match the version of
|
Changes for 1.4.0 (we skipped 1.2.* and 1.3.* to match the version of
|
||||||
Google Test):
|
Google Test):
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Automake file
|
||||||
|
|
||||||
# Nonstandard package files for distribution.
|
# Nonstandard package files for distribution.
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
|
|
||||||
@ -16,6 +18,12 @@ DISTCLEANFILES = scripts/gmock-config
|
|||||||
# directories.
|
# directories.
|
||||||
AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
|
AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
|
||||||
|
|
||||||
|
# Modifies compiler and linker flags for pthreads compatibility.
|
||||||
|
if HAVE_PTHREADS
|
||||||
|
AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
|
||||||
|
AM_LIBS = @PTHREAD_LIBS@
|
||||||
|
endif
|
||||||
|
|
||||||
# Build rules for libraries.
|
# Build rules for libraries.
|
||||||
lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
|
lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
|
||||||
|
|
||||||
|
25
configure.ac
25
configure.ac
@ -1,5 +1,7 @@
|
|||||||
|
m4_include(gtest/m4/acx_pthread.m4)
|
||||||
|
|
||||||
AC_INIT([Google C++ Mocking Framework],
|
AC_INIT([Google C++ Mocking Framework],
|
||||||
[1.4.0],
|
[1.5.0],
|
||||||
[googlemock@googlegroups.com],
|
[googlemock@googlegroups.com],
|
||||||
[gmock])
|
[gmock])
|
||||||
|
|
||||||
@ -35,6 +37,25 @@ AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"])
|
|||||||
|
|
||||||
# TODO(chandlerc@google.com) Check for the necessary system headers.
|
# TODO(chandlerc@google.com) Check for the necessary system headers.
|
||||||
|
|
||||||
|
# Configure pthreads.
|
||||||
|
AC_ARG_WITH([pthreads],
|
||||||
|
[AS_HELP_STRING([--with-pthreads],
|
||||||
|
[use pthreads (default is yes)])],
|
||||||
|
[with_pthreads=$withval],
|
||||||
|
[with_pthreads=check])
|
||||||
|
|
||||||
|
have_pthreads=no
|
||||||
|
AS_IF([test "x$with_pthreads" != "xno"],
|
||||||
|
[ACX_PTHREAD(
|
||||||
|
[],
|
||||||
|
[AS_IF([test "x$with_pthreads" != "xcheck"],
|
||||||
|
[AC_MSG_FAILURE(
|
||||||
|
[--with-pthreads was specified, but unable to be used])])])
|
||||||
|
have_pthreads="$acx_pthread_ok"])
|
||||||
|
AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
|
||||||
|
AC_SUBST(PTHREAD_CFLAGS)
|
||||||
|
AC_SUBST(PTHREAD_LIBS)
|
||||||
|
|
||||||
# GoogleMock currently has hard dependencies upon GoogleTest above and beyond
|
# GoogleMock currently has hard dependencies upon GoogleTest above and beyond
|
||||||
# running its own test suite, so we both provide our own version in
|
# running its own test suite, so we both provide our own version in
|
||||||
# a subdirectory and provide some logic to use a custom version or a system
|
# a subdirectory and provide some logic to use a custom version or a system
|
||||||
@ -80,7 +101,7 @@ AC_ARG_VAR([GTEST_VERSION],
|
|||||||
[The version of Google Test available.])
|
[The version of Google Test available.])
|
||||||
HAVE_BUILT_GTEST="no"
|
HAVE_BUILT_GTEST="no"
|
||||||
|
|
||||||
GTEST_MIN_VERSION="1.4.0"
|
GTEST_MIN_VERSION="1.5.0"
|
||||||
|
|
||||||
AS_IF([test "x${enable_external_gtest}" = "xyes"],
|
AS_IF([test "x${enable_external_gtest}" = "xyes"],
|
||||||
[# Begin filling in variables as we are able.
|
[# Begin filling in variables as we are able.
|
||||||
|
@ -112,7 +112,7 @@ template <typename F> class FunctionMockerBase;
|
|||||||
// expectations when InSequence() is used, and thus affect which
|
// expectations when InSequence() is used, and thus affect which
|
||||||
// expectation gets picked. Therefore, we sequence all mock function
|
// expectation gets picked. Therefore, we sequence all mock function
|
||||||
// calls to ensure the integrity of the mock objects' states.
|
// calls to ensure the integrity of the mock objects' states.
|
||||||
extern Mutex g_gmock_mutex;
|
GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex);
|
||||||
|
|
||||||
// Abstract base class of FunctionMockerBase. This is the
|
// Abstract base class of FunctionMockerBase. This is the
|
||||||
// type-agnostic part of the function mocker interface. Its pure
|
// type-agnostic part of the function mocker interface. Its pure
|
||||||
|
@ -103,7 +103,7 @@ FailureReporterInterface* GetFailureReporter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Protects global resources (stdout in particular) used by Log().
|
// Protects global resources (stdout in particular) used by Log().
|
||||||
static Mutex g_log_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX);
|
static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);
|
||||||
|
|
||||||
// Returns true iff a log with the given severity is visible according
|
// Returns true iff a log with the given severity is visible according
|
||||||
// to the --gmock_verbose flag.
|
// to the --gmock_verbose flag.
|
||||||
|
@ -53,7 +53,7 @@ namespace internal {
|
|||||||
|
|
||||||
// Protects the mock object registry (in class Mock), all function
|
// Protects the mock object registry (in class Mock), all function
|
||||||
// mockers, and all expectations.
|
// mockers, and all expectations.
|
||||||
Mutex g_gmock_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX);
|
GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex);
|
||||||
|
|
||||||
// Constructs an ExpectationBase object.
|
// Constructs an ExpectationBase object.
|
||||||
ExpectationBase::ExpectationBase(const char* a_file,
|
ExpectationBase::ExpectationBase(const char* a_file,
|
||||||
|
Loading…
Reference in New Issue
Block a user