search for: expect_n

Displaying 2 results from an estimated 2 matches for "expect_n".

Did you mean: expect_ne
2017 Jan 04
5
RFC: Reconsidering adding gmock to LLVM's unittest utilities
...have compelling examples. ## Matchers To start off, it is important to understand that there are two components to what gmock offers. The first has very little to do with "mocks". It is actually a matcher language and system for writing test predicates: EXPECT_EQ(expected, actual); EXPECT_NE(something, something); Become instead: EXPECT_THAT(actual, Eq(expected)); EXPECT_THAT(actual, Ne(not-expected)); This pattern moves the *matcher* out of the *macro*, giving it a proper C++ API. With that, we get two huge benefits: extensibility and composability. You can easily write a matc...
2017 Jan 04
4
RFC: Reconsidering adding gmock to LLVM's unittest utilities
...; ## Matchers > > To start off, it is important to understand that there are two components to what gmock offers. The first has very little to do with "mocks". It is actually a matcher language and system for writing test predicates: > > EXPECT_EQ(expected, actual); > EXPECT_NE(something, something); > > Become instead: > > EXPECT_THAT(actual, Eq(expected)); > EXPECT_THAT(actual, Ne(not-expected)); For the cases where you have containers and other non-trivial objects, I completely agree that this is compelling. However, for simple cases like string...