Commit 616180e6 by zhanyong.wan

New floating-point matchers: DoubleNear() and friends;

AllOf() and AnyOf() can accept any number of arguments now in C++11 mode.
parent f4274520
Changes for 1.7.0:
* All new improvements in Google Test 1.7.0.
* New feature: matchers WhenSorted(), WhenSortedBy(), IsEmpty(), and
SizeIs().
* New feature: matchers DoubleNear(), FloatNear(),
NanSensitiveDoubleNear(), NanSensitiveFloatNear(), 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 exceptions are enabled, a mock method with no
default action now throws instead crashing the test.
* Improvement: function return types used in MOCK_METHOD*() macros can
......
......@@ -376,7 +376,7 @@ class SubstractAction : public ActionInterface<int(int, int)> { // NOLINT
TEST(WithArgsTest, NonInvokeAction) {
Action<int(const string&, int, int)> a = // NOLINT
WithArgs<2, 1>(MakeAction(new SubstractAction));
EXPECT_EQ(8, a.Perform(make_tuple(CharPtr("hi"), 2, 10)));
EXPECT_EQ(8, a.Perform(make_tuple(string("hi"), 2, 10)));
}
// Tests using WithArgs to pass all original arguments in the original order.
......
......@@ -327,7 +327,7 @@ TEST(InvokeTest, FunctionThatTakes10Arguments) {
TEST(InvokeTest, FunctionWithUnusedParameters) {
Action<int(int, int, double, const string&)> a1 =
Invoke(SumOfFirst2);
EXPECT_EQ(12, a1.Perform(make_tuple(10, 2, 5.6, CharPtr("hi"))));
EXPECT_EQ(12, a1.Perform(make_tuple(10, 2, 5.6, string("hi"))));
Action<int(int, int, bool, int*)> a2 =
Invoke(SumOfFirst2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment