New unit test for FM app does not link against stubs, causing failure #819
Unanswered
brianrwillis
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I implemented zlib compression in our team's FM application, and am having trouble implementing unit tests.
I implemented
fm_compression_zlib.c, and created afm_compression_zlib_tests.cto test it.I noticed my
UtAssert_STUB_COUNT()call was not incrementing in my UTs, nor was myUT_SetDeferredRetcode()having any apparent effect.However, I noticed that if I place my tests inside a pre-existing tests file, such as
fm_child_tests.c, the above UT helper functions DID work as expected.After some digging, I found that the fm_child-testrunner executable was linking against the stubs as expected, but my fm_compression-testrunner was not:
objdumpsnippet forcoverage-fm-fm_child-testrunner:objdumpsnippet forcoverage-fm-fm_compression_zlib-testrunner:I would love assistance in debugging this strange issue. I can't find anything apparently incorrect in the way I set up this new test file.
Let me know what other information I can provide.
The changes I made to the provided CMakeLists.txt files are below:
CMakeLists.txt:
unit-test/CMakeLists.txt:
The stub file,
fm_compression_stubs.c, is unchanged from the source.Thanks all.
Beta Was this translation helpful? Give feedback.
All reactions