You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
In a source file, I have function that only call functions declared and defined outside this source file. Mocking these functions is easy and straight forward (thanks for the job, btw).
In this source file, some functions are calling functions also defined inside the same file.
How can I mock these ?
#include "mockbar.h"
#include "mockfoo.h"
test_foo_init()
{
mockbar_init()
foo_init()
}
test_foo_sub1
{
mockbar_sub1()
foo_sub1()
}
test_foo_sub2
{
mockbar_sub2()
foo_sub2()
}
//This function need to access to mocked versions of foo_init, foo_sub1, foo_sub2
// But also to unmocked version of foo_main
// This is where I am stuck
test_foo_main
{
mockfoo_init()
mockfoo_sub1()
mockfoo_sub2()
// unmocked
foo_main()
}
The text was updated successfully, but these errors were encountered:
Hello,
In a source file, I have function that only call functions declared and defined outside this source file. Mocking these functions is easy and straight forward (thanks for the job, btw).
In this source file, some functions are calling functions also defined inside the same file.
How can I mock these ?
Here is a foobar example :
inside foo.c
inside test_foo.c
The text was updated successfully, but these errors were encountered: