Lines Matching full:times
9 many times? with what arguments? what will they return? etc).
215 3. Specify your expectations on them (How many times will a method be called?
235 .Times(AtLeast(1));
297 .Times(cardinality)
309 .Times(cardinality)
330 .Times(5)
336 says that the `turtle` object's `GetX()` method will be called five times, it
402 ### Cardinalities: How Many Times Will It Be Called?
404 The first clause we can specify following an `EXPECT_CALL()` is `Times()`. We
405 call its argument a **cardinality** as it tells *how many times* the call should
406 occur. It allows us to repeat an expectation many times without actually writing
407 it as many times. More importantly, a cardinality can be "fuzzy", just like a
410 An interesting special case is when we say `Times(0)`. You may have guessed - it
419 The `Times()` clause can be omitted. **If you omit `Times()`, gMock will infer
423 `EXPECT_CALL()`, the inferred cardinality is `Times(1)`.
425 1, the cardinality is `Times(n)`.
427 0, the cardinality is `Times(AtLeast(n))`.
430 called twice but actually called four times?
460 says that `turtle.GetX()` will be called *exactly three times* (gMock inferred
462 explicitly write `Times()`), and will return 100, 200, and 300 respectively.
475 explicit `Times()`), will return 100 and 200 respectively the first two times,
478 Of course, if you explicitly write a `Times()`, gMock will not try to infer the
489 only once, even though the action may be performed many times. Therefore you
497 .Times(4)
514 .Times(4)
518 Obviously `turtle.GetY()` is expected to be called four times. But if you think
542 .Times(2);
545 If `Forward(10)` is called three times in a row, the third time it will be an
561 and `Times(AnyNumber())` (omitting arguments, or with `_` for all arguments, if
619 .Times(AnyNumber());
621 .Times(2);
624 Suppose `turtle.GoTo(0, 0)` is called three times. In the third time, gMock will
649 If you think it says that `turtle.GetX()` will be called `n` times and will
696 For example, in some tests we may not care about how many times `GetX()` and