Add test utilities
ClosedPublic

Authored by wojnilowicz on Jul 14 2018, 6:25 PM.

Details

Reviewers
tbaumgart
Group Reviewers
KMyMoney
Commits
R261:35116d6fc1ee: Add test utilities
Summary

It's mostly rename from reports_testcommon. I think it should be a center place for testing every class in KMM and not only reports.

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wojnilowicz requested review of this revision.Jul 14 2018, 6:25 PM
wojnilowicz created this revision.
tbaumgart requested changes to this revision.Jul 15 2018, 7:04 AM

Other than that it looks good to me.

kmymoney/plugins/views/reports/core/tests/pivottable-test.cpp
53
filename = QString("report-%1.csv").arg((filenumber, 2, 10,QLatin1Char('0'));

I know, you just used the old code, but we should improve it while we're at it.

69
filename = QString("report-%1.csv").arg((filenumber, 2, 10,QLatin1Char('0'));
kmymoney/plugins/views/reports/core/tests/querytable-test.cpp
50
filename = QString("report-%1.csv").arg((filenumber, 2, 10,QLatin1Char('0'));
65
filename = QString("qreport-%1.csv").arg((filenumber, 2, 10,QLatin1Char('0'));

Not sure, if the leading q in the filename is just a typo or really wanted since all others don't have it.

This revision now requires changes to proceed.Jul 15 2018, 7:04 AM
This revision was not accepted when it landed; it landed in state Needs Revision.Jul 15 2018, 9:19 AM
This revision was automatically updated to reflect the committed changes.

I think it's not a good idea to improve code on such occasions. Code could be easily broken and it would be hard to find a cause.