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
I have exactly the same problem as #926. I want to test the internals of a .c file (I have a state machine and between the poisons of #including a .c and accessing the static elements or doing it "the right way" and setting the state of my tests via the public API (i.e. complex tests) I pick the first).
So my test file
#include"spard.h"#include"spard.c"TEST_SOURCE_FILE("spard.c") // I have no idea how to use this :S//My tests
...
Everything compiles and works, but I still get
-----------------------------
GCOV: ✅ OVERALL TEST SUMMARY
-----------------------------
TESTED: 17
PASSED: 17
FAILED: 0
IGNORED: 0
---------------------------
GCOV: CODE COVERAGE SUMMARY
---------------------------
test_spard
----------
⚠️ WARNING: Found no coverage results for test_spard::spard.c
Running Gcovr Coverage Reports
------------------------------
Generating HTML coverage report in 'build/artifacts/gcov/gcovr'...
Done in 0.492 seconds.
Ceedling operations completed in 4.77 seconds
I have two installations of Ceedling. On Windows, I have Ceedling:: 0.31.1, but I just installed the daily available today (Ceedling => 1.0.0-9fc30fb) in WSL. The results I pasted are from the WSL.
The issue I linked suggests, on v0.31, to add a fake "spard.h" in support, so Ceedling pulls "spard.c", but because I already #included "spard.c", all hell breaks loose in the linking step, as I have two definitions of everything.
Is there a way to get coverage of an #included .c? I'm happy if it's only possible in v1.0, I hope to get rid of 0.31 soon.
The text was updated successfully, but these errors were encountered:
Hi,
I have exactly the same problem as #926. I want to test the internals of a .c file (I have a state machine and between the poisons of #including a .c and accessing the static elements or doing it "the right way" and setting the state of my tests via the public API (i.e. complex tests) I pick the first).
So my test file
Everything compiles and works, but I still get
I have two installations of Ceedling. On Windows, I have
Ceedling:: 0.31.1
, but I just installed the daily available today (Ceedling => 1.0.0-9fc30fb) in WSL. The results I pasted are from the WSL.The issue I linked suggests, on v0.31, to add a fake "spard.h" in support, so Ceedling pulls "spard.c", but because I already #included "spard.c", all hell breaks loose in the linking step, as I have two definitions of everything.
Is there a way to get coverage of an
#included .c
? I'm happy if it's only possible in v1.0, I hope to get rid of 0.31 soon.The text was updated successfully, but these errors were encountered: