Skip to content

test: add unit tests for 5 lcov coverage gap areas (V-9047) - #299

Merged
wyu71 merged 1 commit into
linuxdeepin:masterfrom
wyu71:agent/ut-bot/b501d326ef95
Nov 23, 2026
Merged

wyu71 merged 1 commit into
linuxdeepin:masterfrom
wyu71:agent/ut-bot/b501d326ef95

Conversation

@wyu71

@wyu71 wyu71 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Add 58 Test cases across 5 test files covering previously
unhit line blocks identified by lcov:

  1. test_application_coverage_ext.cpp (12 tests)
  2. test_page_nullctx_dtors.cpp (14 tests)
  3. test_drawboard_loadfiles_ext.cpp (5 tests)
  4. test_cexportimagedialog_ext2.cpp (22 tests)
  5. test_pageview_wheelevent_ext.cpp (5 tests)

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

Summary by Sourcery

Increase unit-test coverage for identified application, page, file-loading, image-export, and view-interaction gaps while stabilizing shared test cleanup and state management.

Enhancements:

  • Expand unit-test coverage across application behavior, page lifecycle and null-context fallbacks, image export sizing and notifications, file loading, image saving, view scaling, and wheel-event handling.
  • Harden the test harness against page/tab state drift, duplicate tab entries, asynchronous PageView destruction, and static menu lifetime issues.

Tests:

  • Add 58 unit tests covering five previously untested lcov coverage areas and related page/tab test scenarios.

@sourcery-ai

sourcery-ai Bot commented Nov 20, 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 3 days and 11 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Tests

Read the application coverage tests together: they exercise filename validation, picture limits, and the empty-path loading branch.

  • tests/test_application_coverage_ext.cpp L1-158

Read the export-dialog tests together: they cover sizing branches, alert handling, and tip-label timer behavior.

  • tests/test_cexportimagedialog_ext2.cpp L1-403

Read the file-loading tests together: they exercise real PNG, JPG, and DDF inputs, including repeated and mixed loads.

  • tests/test_drawboard_loadfiles_ext.cpp L1-228

Read the page lifecycle tests and their test-harness cleanup together: they cover null-context fallbacks and page behavior while repairing duplicate-tab and page-state issues.

  • tests/test_page_methods.cpp L16-19, L79-98
  • tests/test_page_nullctx_dtors.cpp L1-302
  • tests/test_qtestmain.cpp L15, L149-173

Read the wheel-event tests together to check the expected scroll and zoom behavior.

  • tests/test_pageview_wheelevent_ext.cpp L1-132

Read the tab-bar menu test changes with the page-state cleanup changes: the persistent menu lifetime adjustment affects later menu tests.

  • tests/test_tabbarwgt_lambdas.cpp L157-163, L189-203

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

@wyu71
wyu71 force-pushed the agent/ut-bot/b501d326ef95 branch 2 times, most recently from 8827ba9 to f73076d Compare November 23, 2026 03:45
Add 58 Test cases across 5 test files covering previously
unhit line blocks identified by lcov:
1. test_application_coverage_ext.cpp (12 tests)
2. test_page_nullctx_dtors.cpp (14 tests)
3. test_drawboard_loadfiles_ext.cpp (5 tests)
4. test_cexportimagedialog_ext2.cpp (22 tests)
5. test_pageview_wheelevent_ext.cpp (5 tests)

Issue: V-9047
Log: add unit tests for 5 lcov coverage gap areas
@wyu71
wyu71 force-pushed the agent/ut-bot/b501d326ef95 branch from f73076d to cd3bfa9 Compare November 23, 2026 05:37
@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 c269aed into linuxdeepin:master Nov 23, 2026
14 checks passed
@wyu71
wyu71 deleted the agent/ut-bot/b501d326ef95 branch November 23, 2026 08:05
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