Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ unsigned int DISPLAY_get_line_insert_index();
Here's how you would define fake functions for these in your test suite:

```c
FAKE_VALUE_FUNC(unsigned int, DISPLAY_get_line_capacity);
FAKE_VALUE_FUNC(unsigned int, DISPLAY_get_line_insert_index);
FAKE_VALUE_FUNC0(unsigned int, DISPLAY_get_line_capacity);
FAKE_VALUE_FUNC0(unsigned int, DISPLAY_get_line_insert_index);
```

And the unit test might look something like this:
Expand Down Expand Up @@ -167,6 +167,10 @@ you would use a syntax like this:
```c
FAKE_VALUE_FUNC(double, pow, double, double);
```

Note the difference between `FAKE_VALUE_FUNC0` for functions without arguments
and `FAKE_VALUE_FUNC` for functions with arguments.

## Resetting a Fake

Good tests are isolated tests, so it is important to reset the fakes for each
Expand Down