diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-07 22:23:49 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-07 22:23:49 +0200 |
commit | da2b049e248c1ad7efeb53685158a205335e4e36 (patch) | |
tree | 1e7e5e940e9b760b2108081b1d2f3879cebdb0ff /tests/mailtest.cpp | |
parent | 9bcb822963fc96c94dbe7dcc4134dcd2dac454ff (diff) | |
download | sink-da2b049e248c1ad7efeb53685158a205335e4e36.tar.gz sink-da2b049e248c1ad7efeb53685158a205335e4e36.zip |
A new debug system.
Instead of a single #define as debug area the new system allows for an
identifier for each debug message with the structure component.area.
The component is a dot separated identifier of the runtime component,
such as the process or the plugin.
The area is the code component, and can be as such defined at
compiletime.
The idea of this system is that it becomes possible to i.e. look at the
output of all messages in the query subsystem of a specific resource
(something that happens in the client process, but in the
resource-specific subcomponent).
The new macros are supposed to be less likely to clash with other names,
hence the new names.
Diffstat (limited to 'tests/mailtest.cpp')
-rw-r--r-- | tests/mailtest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/mailtest.cpp b/tests/mailtest.cpp index 8031cf1..0537175 100644 --- a/tests/mailtest.cpp +++ b/tests/mailtest.cpp | |||
@@ -31,6 +31,8 @@ | |||
31 | using namespace Sink; | 31 | using namespace Sink; |
32 | using namespace Sink::ApplicationDomain; | 32 | using namespace Sink::ApplicationDomain; |
33 | 33 | ||
34 | SINK_DEBUG_AREA("mailtest") | ||
35 | |||
34 | void MailTest::initTestCase() | 36 | void MailTest::initTestCase() |
35 | { | 37 | { |
36 | Test::initTest(); | 38 | Test::initTest(); |
@@ -251,7 +253,7 @@ void MailTest::testMoveMail() | |||
251 | auto mail = *mails.first(); | 253 | auto mail = *mails.first(); |
252 | modifiedMail = mail; | 254 | modifiedMail = mail; |
253 | QCOMPARE(mail.getFolder(), folder.identifier()); | 255 | QCOMPARE(mail.getFolder(), folder.identifier()); |
254 | Warning() << "path: " << mail.getMimeMessagePath(); | 256 | SinkWarning() << "path: " << mail.getMimeMessagePath(); |
255 | QVERIFY(QFile(mail.getMimeMessagePath()).exists()); | 257 | QVERIFY(QFile(mail.getMimeMessagePath()).exists()); |
256 | }); | 258 | }); |
257 | VERIFYEXEC(job); | 259 | VERIFYEXEC(job); |
@@ -270,7 +272,7 @@ void MailTest::testMoveMail() | |||
270 | auto mail = *mails.first(); | 272 | auto mail = *mails.first(); |
271 | QCOMPARE(mail.getFolder(), folder1.identifier()); | 273 | QCOMPARE(mail.getFolder(), folder1.identifier()); |
272 | QVERIFY(QFile(mail.getMimeMessagePath()).exists()); | 274 | QVERIFY(QFile(mail.getMimeMessagePath()).exists()); |
273 | Trace() << "Mime message path: " << mail.getMimeMessagePath(); | 275 | SinkTrace() << "Mime message path: " << mail.getMimeMessagePath(); |
274 | }); | 276 | }); |
275 | VERIFYEXEC(job); | 277 | VERIFYEXEC(job); |
276 | } | 278 | } |