Skip to content

Fix #199, Add test for missing branch in SAMPLE_APP_Process()#200

Merged
dzbaker merged 1 commit intonasa:mainfrom
thnkslprpt:fix-199-add-test-for-missing-branch-in-SAMPLE_APP_Process
Oct 30, 2023
Merged

Fix #199, Add test for missing branch in SAMPLE_APP_Process()#200
dzbaker merged 1 commit intonasa:mainfrom
thnkslprpt:fix-199-add-test-for-missing-branch-in-SAMPLE_APP_Process

Conversation

@thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Mar 7, 2023

Checklist

Describe the contribution

  • Fixes Missing test for one branch in SAMPLE_APP_Process() #199
    • Tests added to cover missing branch.
      • The test calls SAMPLE_APP_Process() with a seeded failure from CFE_TBL_ReleaseAddress().
      • The desired branch flow is confirmed by checking for the expected 3 additional calls to CFE_ES_WriteToSysLog() (in this function, only this specific path would add 3 additional calls to CFE_ES_WriteToSysLog()).

Testing performed
GitHub CI actions all passing successfully.
Tested locally confirming extra branch covered now, increasing branch coverage slightly (from 37/41 to 38/41 branches) and line cover to 100%.

Prior:
image
Screenshot 2023-03-07 18 01 33

With these changes:
Screenshot 2023-03-07 17 52 38
Screenshot 2023-03-07 17 54 39

Expected behavior changes
Tests now cover an additional branch.

System(s) tested on
Intel(R) Celeron(R) N4100 CPU @ 1.10GHz x86_64
Debian GNU/Linux 11 (bullseye)
Current main branch of cFS.

Contributor Info
Avi Weiss @thnkslprpt

@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Oct 26, 2023
@dzbaker dzbaker added CCB:Approved Indicates code approval by CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Oct 26, 2023
@dzbaker dzbaker merged commit f764a7f into nasa:main Oct 30, 2023
@thnkslprpt thnkslprpt deleted the fix-199-add-test-for-missing-branch-in-SAMPLE_APP_Process branch October 31, 2023 07:16
@dzbaker dzbaker added this to the v7.0.0 milestone Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CCB:Approved Indicates code approval by CCB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing test for one branch in SAMPLE_APP_Process()

3 participants