Skip to content

Commit eb050ff

Browse files
author
Arnd R. Strube
committed
Add 'Miscellaneous' section & Coveralls badge
1 parent 36e3b19 commit eb050ff

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

_includes/header.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ <h2>CppUTest unit testing and mocking framework for C/C++</h2>
2222
<div class="navbar navbar-inverse">
2323
<div class="navbar-inner">
2424
<a class="brand" href="index.html">CppUTest</a>
25+
<a class="brand" href='https://coveralls.io/github/arstrube/cpputest?branch=master'><img src='https://coveralls.io/repos/github/arstrube/cpputest/badge.svg?branch=master' alt='Coverage Status' /></a>
26+
2527
<ul class="nav">
2628
<li class="divider-vertical"></li>
2729
<li><a href="manual.html">Core Manual</a></li>

mocking_manual.markdown

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ The main idea is to make manual mocking easier, rather than to make automated mo
2727
* [MockSupport Scope](#mock_scope)
2828
* [MockPlugin](#mock_plugin)
2929
* [C Interface](#c_interface)
30+
* [Miscellaneous](#miscellaneous)
3031

3132
<a id="simple_scenario"> </a>
3233

@@ -495,3 +496,21 @@ mock_c()->clear();
495496
{% endhighlight %}
496497

497498
The C interface uses a similar builder structure as the C++ interface. It is far less common in C, but it works the same.
499+
500+
<a id="miscellaneous"></a>
501+
502+
### Miscellaneous
503+
504+
If you expect several identical calls, for example five calls to productionCode, you can also use:
505+
506+
{% highlight c++ %}
507+
mock().expectNCalls(5, "productionCode");
508+
{% endhighlight %}
509+
510+
If you want your test to be more explicit about that a certain mocked function call should not occur, you can write (v3.8):
511+
512+
{% highlight c++ %}
513+
mock().expectNoCall("productionCode");
514+
{% endhighlight %}
515+
516+
Doing so is functionally equivalent to stating no expectations at all.

0 commit comments

Comments
 (0)