I have custom QWidgets where all the painting is done manually (fillRect, drawRect, drawText, drawPixmap..) . There are up to 120 properties affecting what's going to be paint, how it's blinking and so on. Legacy spaghetti code.
When I'm changing something I would like to first test cover old functionality. Is there a recommended way how to cover QWidget::paintEvent(QPaintEvent* event)
with unit tests? Do I have to mock QPainter, or is there a way for checking paintEvent output?
How you are covering paintEvetnt with tests?