Feature/bacnet bacerror unit tests (#407)
* Add <zephyr/fff.h> from zephyr v3.1.0 Zephyr is deprecating the zmock library in favor of using the FFF faking library for defining and controlling fake implementations of depended-upon APIs called by the code-under-test. Signed-off-by: Gregory Shue <gregory.shue@legrand.com> * Fix bacerror_decode_service_request return value; add unit tests bacerror_decode_service_request() return value now includes the apdu bytes parsed for invoke_id and service. Also added a unit test for functions in bacerror.c, using `fff` for faking the depended-upon functions. Verified by: 1. (Pass) cd $bacnet-stack/test && make test 2. (Pass) west build -p always -b unit_testing \ bacnet-stack/zephyr/tests/unit/bacnet/bacerror/ && \ ./build/testbinary 3. (Pass) ./zephyr/scripts/twister -p unit_testing \ -T bacnet-stack/zephyr/tests/unit/bacnet/bacerror/ Signed-off-by: Gregory Shue <gregory.shue@legrand.com> --------- Signed-off-by: Gregory Shue <gregory.shue@legrand.com> Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
This commit is contained in:
@@ -33,6 +33,7 @@ add_custom_command(TARGET lcov
|
||||
#
|
||||
|
||||
list(APPEND testdirs
|
||||
unit/bacnet/bacerror
|
||||
unit/bacnet/bits
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user