Test: Automatically generate mocks using the header files linked in a source file

Open
#264 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c

Research direction

Start by reviewing the repository's existing C unit-testing workflow and the header and source files used by it. Define the generator input as a list of header files, then verify that it parses function prototypes and produces compilable mocks; automatic discovery from a source file's #includes is an optional extension.

Written by the indexing model from the issue text.

Description

enhancement

Description

As part of unit testing, we need to be able to mock or stub the returns of functions in order to make sure the test compiles and we can exercise all branches.

Create a generator that takes a list of header files, parses for a function prototype, then generates mocks based on that prototype. Bonus points if you parse for the header files in the #includes of a file automatically.

Dominant language
C
Stars
8
Forks
6
Avg merge
6d 15h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.

More from SunDevilRocketry/Flight-Computer-Firmware

All issues in SunDevilRocketry/Flight-Computer-Firmware

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.