Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure codebase and add unit tests #46

Open
7 of 8 tasks
marcransome opened this issue Aug 25, 2022 · 1 comment
Open
7 of 8 tasks

Restructure codebase and add unit tests #46

marcransome opened this issue Aug 25, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@marcransome
Copy link
Owner

marcransome commented Aug 25, 2022

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 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.

Tasks

Footnotes

  1. 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.

@marcransome marcransome added this to the 1.2.0 milestone Aug 25, 2022
@marcransome marcransome self-assigned this Aug 25, 2022
@marcransome marcransome added this to flog Aug 25, 2022
@marcransome marcransome moved this to Todo in flog Aug 25, 2022
@marcransome

This comment was marked as resolved.

@marcransome marcransome pinned this issue Aug 28, 2022
@marcransome marcransome added documentation Improvements or additions to documentation enhancement New feature or request and removed documentation Improvements or additions to documentation labels Aug 29, 2022
@marcransome marcransome moved this from To do to In Progress in flog Sep 3, 2022
@marcransome marcransome modified the milestones: 1.2.0, 1.3.0 Sep 9, 2022
@marcransome marcransome modified the milestones: 1.3.0, 1.4.0 Jan 14, 2023
@marcransome marcransome changed the title Add unit tests Restructure codebase and add unit tests Feb 4, 2023
@marcransome marcransome modified the milestones: 1.4.0, 1.5.0 Jun 29, 2023
@marcransome marcransome modified the milestones: 1.5.0, 1.6.0 Mar 24, 2024
@marcransome marcransome modified the milestones: 1.6.0, 1.7.0 Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

1 participant