mailcommon
searchruledatetest.cpp
Go to the documentation of this file.
49 MailCommon::SearchRuleDate searchrule2("<date>", MailCommon::SearchRule::FuncEquals, QDate(2015,5,5).toString(Qt::ISODate));
59 QTest::newRow("equaldontmatch") << MailCommon::SearchRule::FuncEquals << QDate(2015,5,5) << QDate(2015,5,6) << false;
60 QTest::newRow("equalmatch") << MailCommon::SearchRule::FuncEquals << QDate(2015,5,5) << QDate(2015,5,5) << true;
61 QTest::newRow("notequalnotmatch") << MailCommon::SearchRule::FuncNotEqual << QDate(2015,5,5) << QDate(2015,5,5) << false;
62 QTest::newRow("notequalmatch") << MailCommon::SearchRule::FuncNotEqual << QDate(2015,5,5) << QDate(2015,5,6) << true;
64 QTest::newRow("isgreatermatch") << MailCommon::SearchRule::FuncIsGreater << QDate(2015,5,5) << QDate(2015,5,4) << true;
65 QTest::newRow("isgreaternotmatch") << MailCommon::SearchRule::FuncIsGreater << QDate(2015,5,5) << QDate(2015,5,6) << false;
66 QTest::newRow("isgreaternotmatchequalvalue") << MailCommon::SearchRule::FuncIsGreater << QDate(2015,5,5) << QDate(2015,5,5) << false;
68 QTest::newRow("islessorequalmatch") << MailCommon::SearchRule::FuncIsLessOrEqual << QDate(2015,5,5) << QDate(2015,5,6) << true;
69 QTest::newRow("islessorequalmatch equal") << MailCommon::SearchRule::FuncIsLessOrEqual << QDate(2015,5,5) << QDate(2015,5,5) << true;
70 QTest::newRow("islessorequalnotmatch") << MailCommon::SearchRule::FuncIsLessOrEqual << QDate(2015,5,7) << QDate(2015,5,5) << false;
73 QTest::newRow("islessmatch") << MailCommon::SearchRule::FuncIsLess << QDate(2015,5,4) << QDate(2015,5,5) << true;
74 QTest::newRow("islessnotmatch") << MailCommon::SearchRule::FuncIsLess << QDate(2015,5,5) << QDate(2015,5,4) << false;
75 QTest::newRow("islessnotmatchequalvalue") << MailCommon::SearchRule::FuncIsLess << QDate(2015,5,5) << QDate(2015,5,5) << false;
78 QTest::newRow("isgreaterorequalmatch") << MailCommon::SearchRule::FuncIsGreaterOrEqual << QDate(2015,5,6) << QDate(2015,5,5) << true;
79 QTest::newRow("isgreaterorequalmatch equal") << MailCommon::SearchRule::FuncIsGreaterOrEqual << QDate(2015,5,5) << QDate(2015,5,5) << true;
80 QTest::newRow("isgreaterorequalnotmatch") << MailCommon::SearchRule::FuncIsGreaterOrEqual << QDate(2015,5,5) << QDate(2015,5,7) << false;
virtual bool matches(const Akonadi::Item &item) const
Tries to match the rule against the KMime::Message in the given item.
Definition: searchruledate.cpp:49
virtual bool isEmpty() const
Determines whether the rule is worth considering.
Definition: searchruledate.cpp:44
bool isEmpty() const
Definition: searchruledatetest.h:23
virtual RequiredPart requiredPart() const
Returns the required part from the item that is needed for the search to operate. ...
Definition: searchruledate.cpp:95
QByteArray field() const
Returns the message header field name (without the trailing ':').
Definition: searchrule.cpp:501
Definition: searchrule.h:80
char * toString(const T &value)
QTestData & newRow(const char *dataTag)
Definition: searchruledate.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.