Repository navigation
test: add unit tests for V-9310 coverage gaps - #301
Conversation
Reviewer's GuideTestsAdd tests for graphics-item cache invalidation, scaling, painting, and rasterization paths.
Add tests for scene lifecycle, grouping, z-ordering, null guards, hit testing, and undo-recording paths.
Add tests for legacy DDF cancellation, damaged images, writability checks, and save failures.
Add tests for clipboard image and URL-list paste paths.
Add tests for export-image size-setting signals, model changes, and bounds validation.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Add 5 test files covering uncovered code paths in: - src/service/filehander.cpp: old ddf user-cancel branches (EUserCancelLoad_OldBlur/OldPen), damaged image loading (EDamagedImageFile), file/directory writability checks, saveToDdf symlink-loop open failure, saveToImage empty-image guard - src/frame/cgraphicsview.cpp: slotOnPaste with image/png and text/uri-list payloads - src/drawshape/drawItems/bzItems/cgraphicsitem.cpp: cache-related branches (setPenColor/setPenWidth/setBrushColor resetCachePixmap, loadGraphicsUnit with blurInfos, operating/operatingEnd EScal, paint cache drawing, rasterToSelfLayer(true)) - src/drawshape/cdrawscene.cpp: doLeave interrupt, group tree info with processEvent, loadGroupTreeInfo with child groups, group-internal z-order, addCItem/removeCItem null guards, firstItem with penalgor, recordSecenInfoToCmd early return - src/widgets/dialog/cexportimagedialog.cpp: size setting private class branches (keepRadioIfPixelModel sync, editingFinished triggers, resetImageSettingSizeTo, autoKeepSize ETooSmall/ETooBig, isFocusInEditor) Issue: V-9310 Log: add 5 test files covering uncovered code paths
0e969e0 to
eca7773
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pengfeixx, wyu71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
Add 5 unit test files covering uncovered code paths identified in V-9310.
Test Files
test_filehander_oldddf.cppsrc/service/filehander.cpptest_cgraphicsview_paste.cppsrc/frame/cgraphicsview.cpptest_cgraphicsitem_cache.cppsrc/drawshape/drawItems/bzItems/cgraphicsitem.cpptest_cdrawscene_touchevent.cppsrc/drawshape/cdrawscene.cpptest_cexportimagedialog_sizesetting.cppsrc/widgets/dialog/cexportimagedialog.cppTest Results
PageScene::event()callspage()->currentTool_p()without null check;page()returns null insideevent()in offscreen modeisFocusInEditor(): requires widget focus which doesn't work in offscreen modesaveToImageempty-image guard: API takesPageContext*notQImagedirectly; cannot trigger null-image check without modifying business codeTest Environment
QT_QPA_PLATFORM=offscreenSummary by Sourcery
Expand unit-test coverage for V-9310 coverage gaps across file handling, graphics views and items, draw scenes, and export image sizing.
Enhancements:
Tests: