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

[tests] add unit test for RcpHost SetCountryCode #2564

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

Irving-cl
Copy link
Contributor

This PR adds a unit test for RcpHost::SetCountryCode.

The PR also fixes an issue of current usage of FakePlatform. In each gtest case, we should get a new OT Instance. Otherwise the OT instance used in last gtest case will have some remaining tasks which are invalid to process.

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 84.09091% with 7 lines in your changes missing coverage. Please review.

Project coverage is 46.11%. Comparing base (2b41187) to head (25a793d).
Report is 848 commits behind head on main.

Files with missing lines Patch % Lines
tests/gtest/test_rcp_host_api.cpp 86.48% 5 Missing ⚠️
tests/gtest/fake_posix_platform.cpp 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2564      +/-   ##
==========================================
- Coverage   55.77%   46.11%   -9.67%     
==========================================
  Files          87      104      +17     
  Lines        6890    12423    +5533     
  Branches        0      904     +904     
==========================================
+ Hits         3843     5729    +1886     
- Misses       3047     6382    +3335     
- Partials        0      312     +312     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/ncp/rcp_host.cpp Outdated Show resolved Hide resolved
@Irving-cl Irving-cl force-pushed the add_test_rcp_host_setcountrycode branch from 13959e5 to 25a793d Compare October 29, 2024 10:53
Copy link
Contributor

@zhanglongxia zhanglongxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Irving-cl Irving-cl requested a review from jwhui October 30, 2024 01:35
@jwhui jwhui merged commit 7e03f9a into openthread:main Oct 30, 2024
32 checks passed
@Irving-cl Irving-cl deleted the add_test_rcp_host_setcountrycode branch October 30, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants