diff options
Diffstat (limited to 'tests/auto/core/queryparser/tst_queryparser.cpp')
-rw-r--r-- | tests/auto/core/queryparser/tst_queryparser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/core/queryparser/tst_queryparser.cpp b/tests/auto/core/queryparser/tst_queryparser.cpp index bcaade2..fb7f21e 100644 --- a/tests/auto/core/queryparser/tst_queryparser.cpp +++ b/tests/auto/core/queryparser/tst_queryparser.cpp @@ -155,6 +155,17 @@ void TestQueryParser::validQueries() CHECK_ERRORSTRING(term->toString(), representationQuery); + //Test the searialize functions + QByteArray buffer; + QDataStream in(&buffer, QIODevice::WriteOnly); + in << term; + + QDataStream out(buffer); + QIviAbstractQueryTerm *newTerm = nullptr; + out >> &newTerm; + + QCOMPARE(term->toString(), newTerm->toString()); + delete newTerm; delete term; } |