Commit Graph

38 Commits

Author SHA1 Message Date
billydonahue
1f5fdea417 Push several shanges:
Make single argument constructors explicit in macros.

    Remove NOMINMAX macro.

    Add macros for disabling Microsoft Visual C++ warnings.

    Add WhenDynamicCastTo<T> matcher.
    A matcher that matches a pointer that matches inner_matcher when
    dynamic_cast<T> is applied.

    Add IWYU export pragmas to the tuple include lines.

    Fix NativeArray to not require a copy constructor unless we ask for one.
    This allows ElementsAre() to support non-copyable types.

    Examine WINAPI_FAMILY_PARTITION macros to better distinguish windows platforms.
    Author: martin@martin.st
    From: https://codereview.appspot.com/57220043/
2014-05-19 17:54:51 +00:00
kosak
bd0188320d Export tuple and friends in the ::testing namespace. 2014-04-02 20:30:00 +00:00
kosak
b5c81098a8 Support mocking methods with move-only return types. 2014-01-29 06:41:44 +00:00
kosak
04ce8521f4 Adds a note in the "uninteresting mock method call" warning to advise people how to handle the warning.
Clarifies the purpose of utilities in gmock-port.h and adds guidance w.r.t. gmock-port.h vs gtest-port.h.
Pulls in gtest r674.
2014-01-12 23:42:34 +00:00
zhanyong.wan
a9a59e06dd Makes WhenSorted() support associative containers (by billydonahue@google.com). 2013-03-27 16:14:55 +00:00
jgm
38513a8bb1 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.
2012-11-15 15:50:36 +00:00
vladlosev
ada23475e2 Makes gmock's Pointee() work for optional<T> (by Jeffrey Yasskin). 2012-08-14 15:38:49 +00:00
zhanyong.wan
2fd619edd3 Pulls in gtest r615.
Renames internal enums to the kFoo naming style.

Fixes gmock doctor to work with newer versions of Clang.
2012-05-31 20:40:56 +00:00
jgm
79a367eb21 Reduced template instantiation depth for the AllOf and AnyOf matchers. Also some formatting changes. 2012-04-10 16:02:11 +00:00
vladlosev
587c1b37c2 Adds support for building Google Mock as a shared library (DLL). 2011-05-20 00:42:22 +00:00
vladlosev
ab29bb6fcd Removes commas from last items in enums (a C++ standard compliance fix). 2011-04-08 01:32:32 +00:00
zhanyong.wan
658ac0b71a Indents preprocessor directives. 2011-02-24 07:29:13 +00:00
zhanyong.wan
53e08c44dd Include gtest and gmock headers as user headers instead of system headers. 2010-09-14 05:38:21 +00:00
zhanyong.wan
ccedc1c933 Removes some gmock internal macros; sorts the file lists in Makefile.am; picks up gtest r454. 2010-08-09 22:46:12 +00:00
zhanyong.wan
02f7106557 Moves the universal printer from gmock to gtest (by Vlad Losev). 2010-05-10 17:14:29 +00:00
zhanyong.wan
d14aaed74b Enables regex matchers on all platforms. 2010-01-14 05:36:32 +00:00
zhanyong.wan
32de5f5376 Fixes a slew of compiler warnings and turns on "warning as error" in the scons build. 2009-12-23 00:13:23 +00:00
zhanyong.wan
39bf784f83 Removes uses of GTEST_HAS_STD_STRING. 2009-12-16 23:36:08 +00:00
zhanyong.wan
f6d6a22b8e Fixes Cygwin compatibility (by Vlad Losev); Improves Python tests (by Vlad Losev); Fixes ambiguous call to implicit_cast; Uses gtest's SkipPrefix() instead gmock's own (by Vlad Losev). 2009-12-01 19:42:25 +00:00
zhanyong.wan
19eb9e9e3d Pulls in gtest r344; improves implicit_cast (by Zhanyong Wan); makes the Python tests work on Windows (by Vlad Losev); adds run_tests.py (by Vlad Losev). 2009-11-24 20:23:18 +00:00
vladlosev
201ac16191 Enables gmock's implicit_cast to work with source types that have a non-const conversion operator (by Zhanyong Wan). 2009-11-18 00:12:05 +00:00
zhanyong.wan
95b12332c3 Makes gmock work on Symbian (both 3rd & 5th editions), original patch contributed by Mika Raento. 2009-09-25 18:55:50 +00:00
zhanyong.wan
4bd79e4f25 Simplifies the definition of NativeArray. Works around a VC bug in StrictMock & NiceMock. 2009-09-16 17:38:08 +00:00
zhanyong.wan
f5e1ce5b92 Adds new matcher Pair(). Replaces GMOCK_CHECK_ with GTEST_CHECK_ (by Vlad Losev). 2009-09-16 07:02:02 +00:00
zhanyong.wan
2b43a9ecd1 Adds mutable_impl() and impl() to PolymorphicMatcher (by Zhanyong Wan); Enables gMock to compile with VC 7.1 (by Vlad Losev). 2009-08-31 23:51:23 +00:00
zhanyong.wan
9571b28675 Removes duplicated definition of SetArgumentPointee (by Vlad Losev); Makes gmock compilable on platforms that don't have ::abort() (by Acadeli Checa); Fixes compatibility with Symbian's STLport (by Acadeli Checa). 2009-08-07 07:15:56 +00:00
zhanyong.wan
bf55085d45 Implements .With() as a synonym of .WithArguments(); implements AllArgs(m) as a synonym of m; relies on gtest-port to #include tuple; fixes a compatibility with Symbian. 2009-06-09 06:09:53 +00:00
zhanyong.wan
b82431625d Makes all container matchers work with (possibly multi-dimensional) native arrays; makes Contains() accept a matcher; adds Value(x, m); improves gmock doctor to diagnose the Type in Template Base disease. 2009-06-04 05:48:20 +00:00
zhanyong.wan
9413f2ff61 Avoids unnecessary printing of call into to internal buffers;
Made the universal value printer safer when printing char[];
Removed duplicated code in InvokeWith;
Improved gmock_doctor.py.
2009-05-29 19:50:06 +00:00
zhanyong.wan
16cf473930 Finishes SafeMatcherCast by catching lossy arithmetic conversions at compile-time; uses ACTION_TEMPLATE to simplify the definition of many actions; makes mock object uncopyable; teaches gmock doctor about wrong MOCK_METHODn. 2009-05-14 20:55:30 +00:00
zhanyong.wan
c6a412397b Adds more tests for using SetArgumentPointee with protobufs; works around a compiler bug on Symbian that gmock-printers.h triggers; reduces template code bloat in gmock-matchers.h; avoids RTTI when it's disabled. 2009-05-13 23:38:40 +00:00
zhanyong.wan
e7bb5ededa Improves the error message for leaked mocks to include the test name (by Zhanyong Wan). 2009-05-05 23:14:47 +00:00
zhanyong.wan
125783fb87 Fixes tr1 tuple's path when compiled with gcc version < 4.0.0 (by Zhanyong Wan). 2009-05-05 19:36:44 +00:00
zhanyong.wan
df35a763b9 Implements --gmock_catch_leaked_mocks and Mock::AllowLeak. 2009-04-22 22:25:31 +00:00
zhanyong.wan
652540a278 Cleans up macro definitions. 2009-02-23 23:37:29 +00:00
zhanyong.wan
e0d051ea64 Makes sure all internal macros are named GMOCK_*_. No functionality is changed. 2009-02-19 00:33:37 +00:00
zhanyong.wan
ce198ff899 Implements the MATCHER* macros. 2009-02-12 01:34:27 +00:00
shiqian
e35fdd936d Initial drop of Google Mock. The files are incomplete and thus may not build correctly yet. 2008-12-10 05:08:54 +00:00