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
Describe the bug
I'm using Ceedling with Unity and FFF to unit test some embedded code.
To make some things work I need to specify #pragma pack(1) for some structures.
I was trying to mock a sequence of return values for a function and the results were not as expected.
Some hours later I have trimmed it down to a minimal reproduction case:
To Reproduce
make sure you have Ceedling and FFF set up etc... This was on Windows 10 with MinGW
Unzip the TestFFFseq.zip, start a command prompt in the TestFFFseq folder and run
ceedling test:all
the result will be
FAILED TEST SUMMARY
[test_FFFseq.c]
Test: test_One
At line (28): "Expected 1 Was 0"
OVERALL TEST SUMMARY
TESTED: 1
PASSED: 0
FAILED: 1
IGNORED: 0
Expected behavior
OVERALL TEST SUMMARY
TESTED: 1
PASSED: 1
FAILED: 0
IGNORED: 0
Compiler, toolset, platform (please complete the following information):
Windows 10 Home
MinGW, Ceedling 0.31.1, latest FFF (Feb 2022)
If one comments out the #pragma pack(1) on line 3 of test_FFFseq.c then the test passes.
I tried but couldn't reproduce without Ceedling generating the fake.
This can be avoided by using #pragma pack(push, 1) and #pragma pack(pop) where one needs it in one's code
Describe the bug
I'm using Ceedling with Unity and FFF to unit test some embedded code.
To make some things work I need to specify #pragma pack(1) for some structures.
I was trying to mock a sequence of return values for a function and the results were not as expected.
Some hours later I have trimmed it down to a minimal reproduction case:
To Reproduce
make sure you have Ceedling and FFF set up etc... This was on Windows 10 with MinGW
Unzip the TestFFFseq.zip, start a command prompt in the TestFFFseq folder and run
ceedling test:all
the result will be
FAILED TEST SUMMARY
[test_FFFseq.c]
Test: test_One
At line (28): "Expected 1 Was 0"
OVERALL TEST SUMMARY
TESTED: 1
PASSED: 0
FAILED: 1
IGNORED: 0
Expected behavior
OVERALL TEST SUMMARY
TESTED: 1
PASSED: 1
FAILED: 0
IGNORED: 0
Compiler, toolset, platform (please complete the following information):
If one comments out the #pragma pack(1) on line 3 of test_FFFseq.c then the test passes.
I tried but couldn't reproduce without Ceedling generating the fake.
This can be avoided by using #pragma pack(push, 1) and #pragma pack(pop) where one needs it in one's code
TestFFFseq.zip
The text was updated successfully, but these errors were encountered: