Skip to content

test(util): improve test coverage for util/print-util.go to 100%#89

Open
yuvraj-kolkar17 wants to merge 1 commit intokubeslice:masterfrom
yuvraj-kolkar17:test/print-util-clean
Open

test(util): improve test coverage for util/print-util.go to 100%#89
yuvraj-kolkar17 wants to merge 1 commit intokubeslice:masterfrom
yuvraj-kolkar17:test/print-util-clean

Conversation

@yuvraj-kolkar17
Copy link

@yuvraj-kolkar17 yuvraj-kolkar17 commented Aug 2, 2025

Description

Added complete test suite for print-util.go achieving 100% code coverage.
Implemented tests for Printf, Fatalf functions and Unicode constants with
proper output verification and edge case handling.

Part of the issue #46

How Has This Been Tested?

Test Commands

# Run tests with coverage profile
go test -v -coverprofile="coverage.out" .

# Check coverage percentage
go test -cover .
After the Coverage
coverage

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit test cases.

Does this PR introduce a breaking change?


Signed-off-by: yuvraj Kolkar <kolkaryuvraj2@gmail.com>
@yuvraj-kolkar17
Copy link
Author

@Alokzh
Copy link
Contributor

Alokzh commented Aug 2, 2025

@yuvraj-kolkar17 There is already an open PR for print-util.go

@yuvraj-kolkar17
Copy link
Author

@yuvraj-kolkar17 There is already an open PR for print-util.go

Thanks for pointing that out, @Alokzh.
But I'm aware of the existing PR #72 for print-util.go, but it currently covers only ~43% of the code (as shown below).
This PR #89 adds tests for the remaining untested parts to improve overall coverage.
Appreciate your response!

image

Copy link
Contributor

@gourishkb gourishkb left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @yuvraj-kolkar17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants