summaryrefslogtreecommitdiffstats
path: root/tests/mailtest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-07-07 22:23:49 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-07-07 22:23:49 +0200
commitda2b049e248c1ad7efeb53685158a205335e4e36 (patch)
tree1e7e5e940e9b760b2108081b1d2f3879cebdb0ff /tests/mailtest.cpp
parent9bcb822963fc96c94dbe7dcc4134dcd2dac454ff (diff)
downloadsink-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.cpp6
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 @@
31using namespace Sink; 31using namespace Sink;
32using namespace Sink::ApplicationDomain; 32using namespace Sink::ApplicationDomain;
33 33
34SINK_DEBUG_AREA("mailtest")
35
34void MailTest::initTestCase() 36void 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 }