InfiniTimeOrg / InfiniTimeOrg/InfiniTime

Add unit testing framework and skeleton test project

Open
#2,058 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

maintenance
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Verification
  • I searched for similar issues (including closed issues) and found none was relevant.
Introduce the issue

Unit testing can improve code quality, help developers find bugs, and make it easier to add new features.

After looking into the project I see that there are no unit tests for Infinitime. I would like to suggest that the community adopts a unit testing framework and add documentation to the source code on how to include test coverage to new or existing code.

Preferred solution

After some initial research it looks like Google Test is a framework that is easy to integrate into an existing project and it has some nice features. There are a lot of unit testing frameworks out there for C++ and I think the community should discuss in case people have preferences for other solutions.

For the scope of this issue, I think the chosen framework should be installed and a skeleton test project should be added to the source code. It should also be well documented and provide a rough outline on how future tests could be included.

Version

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the repository's current C++ build configuration and source layout first; no specific files or tests are named in the issue. Confirm the selected unit-testing framework, add its installation and a skeleton test project, then document how future tests are added and how coverage is run.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, documentation, embedded-iot, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.