diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2023-12-21 10:38:57 +0000 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-01-03 09:07:23 -0700 |
commit | 5fb1a8c671473c59ed556035346fa9f2b2b430f1 (patch) | |
tree | 539eabe67fdbb3bd83c6dd6ff5f297466c1d21ac /include/kunit/test.h | |
parent | fcbac39b7d5e776bed058281af5d3248b94f1282 (diff) |
kunit: Add example of kunit_activate_static_stub() with pointer-to-function
Adds a variant of example_static_stub_test() that shows use of a
pointer-to-function with kunit_activate_static_stub().
A const pointer to the add_one() function is declared. This
pointer-to-function is passed to kunit_activate_static_stub() and
kunit_deactivate_static_stub() instead of passing add_one directly.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit/test.h')
0 files changed, 0 insertions, 0 deletions