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
To facilitate unit testing and integrate the cmocka unit testing framework a significant restructure of the existing project code is required. Given that the cmocka framework executes all tests for a given test target within the same process, getopt's reliance on global state is problematic, and it would be better replaced with the libpopt library which provides additional features such as option aliasing. Unit tests for FlogApi and FlogConfig opaque objects and related functions should be added1 after integration of the unit test framework.
Improved error handling should be introduced in place of immediate exit() calls, and use of errno should be replaced with a defined error type.
Intended outcome
To increase unit test coverage, improve error handling, and automate the build and release process.
Mocking objects with the cmocka unit test framework may require extra effort given the lack of support for the --wrap option in the macOS linker ld64. ↩
The text was updated successfully, but these errors were encountered:
Overview
To facilitate unit testing and integrate the cmocka unit testing framework a significant restructure of the existing project code is required. Given that the
cmocka
framework executes all tests for a given test target within the same process,getopt
's reliance on global state is problematic, and it would be better replaced with thelibpopt
library which provides additional features such as option aliasing. Unit tests forFlogApi
andFlogConfig
opaque objects and related functions should be added1 after integration of the unit test framework.Improved error handling should be introduced in place of immediate
exit()
calls, and use oferrno
should be replaced with a defined error type.Intended outcome
To increase unit test coverage, improve error handling, and automate the build and release process.
Tasks
CTest
andcmocka
to build configuration and restructure codebase to support unit testing #72FlogConfig
opaque type and related functions #73FlogCli
opaque type and related functions #74common.h
) #247utils.h
) #75Footnotes
Mocking objects with the
cmocka
unit test framework may require extra effort given the lack of support for the--wrap
option in the macOS linkerld64
. ↩The text was updated successfully, but these errors were encountered: