1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-23 00:15:59 +01:00

Explain header-only

This commit is contained in:
Mike Long
2011-01-03 12:24:51 +01:00
parent e034598562
commit aa9a9edd90

View File

@@ -32,7 +32,11 @@ Here's how you would define a fake function for this in your test suite:
ASSERT_EQ(1, DISPLAY_init_call_count);
}
So what has happened here? The magic is in the <tt>FAKE_VOID_FUNC0</tt>. This
So what has happened here? The first thing to note is that the framework is
header only, all you need to do to use it is download <tt>fff.h</tt> and include
it in your test suite.
The magic is in the <tt>FAKE_VOID_FUNC0</tt>. This
expands a macro that defines a function returning <tt>void</tt>
which has zero arguments. It also defines a variable
<tt>"function_name"_call_count</tt> which is incremented every time the faked