Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/tests/mymoneyreport-test.cpp
Show All 28 Lines | |||||
29 | { | 29 | { | ||
30 | m = new MyMoneyReport(); | 30 | m = new MyMoneyReport(); | ||
31 | } | 31 | } | ||
32 | 32 | | |||
33 | void MyMoneyReportTest::cleanup() | 33 | void MyMoneyReportTest::cleanup() | ||
34 | { | 34 | { | ||
35 | delete m; | 35 | delete m; | ||
36 | } | 36 | } | ||
37 | | ||||
38 | void MyMoneyReportTest::testElementNames() | | |||
39 | { | | |||
40 | for (auto i = (int)Report::Element::Payee; i <= (int)Report::Element::AccountGroup; ++i) { | | |||
41 | auto isEmpty = MyMoneyReportPrivate::getElName(static_cast<Report::Element>(i)).isEmpty(); | | |||
42 | if (isEmpty) | | |||
43 | qWarning() << "Empty element's name " << i; | | |||
44 | QVERIFY(!isEmpty); | | |||
45 | } | | |||
46 | } | | |||
47 | | ||||
48 | void MyMoneyReportTest::testAttributeNames() | | |||
49 | { | | |||
50 | for (auto i = (int)Report::Attribute::ID; i < (int)Report::Attribute::LastAttribute; ++i) { | | |||
51 | auto isEmpty = MyMoneyReportPrivate::getAttrName(static_cast<Report::Attribute>(i)).isEmpty(); | | |||
52 | if (isEmpty) | | |||
53 | qWarning() << "Empty attribute's name " << i; | | |||
54 | QVERIFY(!isEmpty); | | |||
55 | } | | |||
56 | } | |