Skip to content

Add code coverage for RadioButtonRenderer #13447

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

Merged

Conversation

Zheng-Li01
Copy link
Member

@Zheng-Li01 Zheng-Li01 commented May 13, 2025

Related #13442
Proposed changes
Add unit test file: RadioButtonRendererTests.cs for public/Internal methods & properties of the RadioButtonRenderer.cs

Microsoft Reviewers: Open in CodeFlow

@Zheng-Li01 Zheng-Li01 requested a review from a team as a code owner May 13, 2025 08:08
@Zheng-Li01 Zheng-Li01 added the waiting-review This item is waiting on review by one or more members of team label May 13, 2025
Copy link

codecov bot commented May 13, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 12 lines in your changes missing coverage. Please review.

Project coverage is 76.57643%. Comparing base (5821493) to head (aacd200).
Report is 94 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13447          +/-   ##
====================================================
+ Coverage   62.21083%   76.57643%   +14.36560%     
====================================================
  Files           3213        3252          +39     
  Lines         638302      640880        +2578     
  Branches       47201       47433         +232     
====================================================
+ Hits          397093      490763       +93670     
+ Misses        234153      146583       -87570     
+ Partials        7056        3534        -3522     
Flag Coverage Δ
Debug 76.57643% <90.90909%> (+14.36560%) ⬆️
integration 18.47918% <ø> (-0.30960%) ⬇️
production 50.99625% <ø> (+32.20747%) ⬆️
test 97.41138% <90.90909%> (+0.00726%) ⬆️
unit 48.40761% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds unit tests for the RadioButtonRenderer to improve code coverage for both public and internal methods and properties.

  • Introduces multiple test cases for rendering behaviors, state conversion, and background drawing.
  • Adds tests that validate behavior changes based on whether visual styles are enabled.
Comments suppressed due to low confidence (1)

src/test/unit/System.Windows.Forms/System/Windows/Forms/RadioButtonRendererTests.cs:1

  • The removal of '#nullable disable' suggests the file is now intended to support nullable reference types. Ensure that the rest of the file adheres to the project's nullability guidelines.
-#nullable disable

Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

Other than a small comment, all LGTM!

@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label May 14, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label May 15, 2025
ricardobossan
ricardobossan previously approved these changes May 15, 2025
Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

Thank you!

@Epica3055 Epica3055 merged commit 06297ee into dotnet:main Jun 17, 2025
8 checks passed
@dotnet-policy-service dotnet-policy-service bot removed the waiting-review This item is waiting on review by one or more members of team label Jun 17, 2025
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