Skip to content

test: add unit tests for deepin-draw coverage gaps - #300

Merged
wyu71 merged 1 commit into
linuxdeepin:masterfrom
wyu71:ut-v9255
Nov 24, 2026
Merged

wyu71 merged 1 commit into
linuxdeepin:masterfrom
wyu71:ut-v9255

Conversation

@wyu71

@wyu71 wyu71 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Add 6 test files covering previously uncovered code paths:

  1. test_sitemdata_deepcopy_ext.cpp (15 tests)
  2. test_sitemdata_serialization_ext.cpp (17 tests)
  3. test_ccutwidget_lambdas.cpp (14 tests)
  4. test_ctexttool_fontkb.cpp (6 tests)
  5. test_cmasicotool_zvalue.cpp (9 tests)
  6. test_filehander_colorspace.cpp (11 tests)

Issue: V-9255
Log: add unit tests for 5 lcov coverage gap areas

Summary by Sourcery

Increase unit-test coverage for previously uncovered drawing, editing, serialization, styling, and file-handling code paths.

Enhancements:

  • Expand unit-test coverage for uncovered deep-copy and serialization branches in graphics item data handling.
  • Add behavioral tests for cut-widget callbacks, text-tool font keyboard controls, blur-tool z-value management, combo-box menu styling, and file-handler color-space and path helpers.

Tests:

  • Add focused Qt/GoogleTest coverage across six previously uncovered areas, including boundary conditions, null inputs, legacy serialization formats, signal emissions, and UI state handling.

@wyu71 wyu71 changed the title test: add unit tests for deepin-draw coverage gaps (V-9255) test: add unit tests for deepin-draw coverage gaps Nov 24, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Sorry @wyu71, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 22 hours and 12 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Tests

Add deep-copy tests for the remaining graphics-unit types and their null-source cleanup branches.

  • tests/test_sitemdata_deepcopy_ext.cpp L1-308

Add serialization tests for legacy and current graphics data formats plus graphics-unit stream operators.

  • tests/test_sitemdata_serialization_ext.cpp L1-522

Exercise cut-widget edit, button, and size-adjustment callbacks, including their boundary behavior.

  • tests/test_ccutwidget_lambdas.cpp L1-306

Cover text-tool font-size keyboard handling and combo-box menu delegate style-option branches.

  • tests/test_ctexttool_fontkb.cpp L1-490

Test blur-tool Z-value save and restore behavior and blur-enabled item selection.

  • tests/test_cmasicotool_zvalue.cpp L1-270

Test file-handler image color-space loading and path conversion/control behavior.

  • tests/test_filehander_colorspace.cpp L1-231

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Add 6 test files covering previously uncovered code paths:
1. test_sitemdata_deepcopy_ext.cpp (15 tests)
2. test_sitemdata_serialization_ext.cpp (17 tests)
3. test_ccutwidget_lambdas.cpp (14 tests)
4. test_ctexttool_fontkb.cpp (6 tests)
5. test_cmasicotool_zvalue.cpp (9 tests)
6. test_filehander_colorspace.cpp (11 tests)

Issue: V-9255
Log: add unit tests for 5 lcov coverage gap areas
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wyu71

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wyu71
wyu71 merged commit b459049 into linuxdeepin:master Nov 24, 2026
14 checks passed
@wyu71
wyu71 deleted the ut-v9255 branch November 24, 2026 05:20
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