Isolate every test within WaylandOutputManagement
ClosedPublic

Authored by davidedmundson on Jun 25 2018, 10:16 PM.

Details

Summary

The current code used the same outputInterface between all tests, with
data and outdated connections slowly accumulating.

This meant most the code didn't work as it was intended, for
example testExampleConfig had the config applied from the connect in the
previous test. It just happened to pass.

This resets everything between each test.

Test Plan

Can now add a test without going insane
Existing tests still pass

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 25 2018, 10:16 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jun 25 2018, 10:16 PM
romangg accepted this revision.Jul 2 2018, 9:44 AM
romangg added a subscriber: romangg.

There is no reason to use the member variable m_outputConfiguration and the method createConfig anymore. Just use a scoped pointer in the tests you need it. But we can leave it like this as well. Other inline comments are up to you.

autotests/client/test_wayland_outputmanagement.cpp
68

Btw as a private method this test is not performed at all.

180

m_registry->create(m_connection);

184

m_connection->flush();

476

rm new line

512

rm new line

This revision is now accepted and ready to land.Jul 2 2018, 9:44 AM
This revision was automatically updated to reflect the committed changes.