summaryrefslogtreecommitdiffstats
path: root/tests/domainadaptortest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-08 13:18:19 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-08 13:18:19 +0100
commitae4b64b198a143240aa5dd1e202e5016abfdae71 (patch)
tree5d9d58a512ebc60c44637d11c9424f67a02887e8 /tests/domainadaptortest.cpp
parentf425c2070131161dc11bcf70e35f8d1848cadb65 (diff)
downloadsink-ae4b64b198a143240aa5dd1e202e5016abfdae71.tar.gz
sink-ae4b64b198a143240aa5dd1e202e5016abfdae71.zip
Wrap references in a Reerence type.
This allows us to make sure that references are not taken out of context (the resource). Because we need to use the type-specific accessors more we also ran into a problem that we cannot "downcast" a reference with the change recording still working, for that we have the cast<T>() operator now.
Diffstat (limited to 'tests/domainadaptortest.cpp')
-rw-r--r--tests/domainadaptortest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/domainadaptortest.cpp b/tests/domainadaptortest.cpp
index 4fd04db..a17152e 100644
--- a/tests/domainadaptortest.cpp
+++ b/tests/domainadaptortest.cpp
@@ -110,6 +110,7 @@ private slots:
110 Sink::ApplicationDomain::Mail mail; 110 Sink::ApplicationDomain::Mail mail;
111 mail.setExtractedSubject("summary"); 111 mail.setExtractedSubject("summary");
112 mail.setMimeMessage("foobar"); 112 mail.setMimeMessage("foobar");
113 mail.setFolder("folder");
113 114
114 flatbuffers::FlatBufferBuilder metadataFbb; 115 flatbuffers::FlatBufferBuilder metadataFbb;
115 auto metadataBuilder = Sink::MetadataBuilder(metadataFbb); 116 auto metadataBuilder = Sink::MetadataBuilder(metadataFbb);
@@ -134,6 +135,7 @@ private slots:
134 Sink::ApplicationDomain::Mail readMail{QByteArray{}, QByteArray{}, 0, adaptor}; 135 Sink::ApplicationDomain::Mail readMail{QByteArray{}, QByteArray{}, 0, adaptor};
135 QCOMPARE(readMail.getSubject(), mail.getSubject()); 136 QCOMPARE(readMail.getSubject(), mail.getSubject());
136 QCOMPARE(readMail.getMimeMessage(), mail.getMimeMessage()); 137 QCOMPARE(readMail.getMimeMessage(), mail.getMimeMessage());
138 QCOMPARE(readMail.getFolder(), mail.getFolder());
137 } 139 }
138 140
139 } 141 }