File indexing completed on 2024-05-19 11:32:54
0001 /* 0002 This file is part of the KDE Baloo project. 0003 SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.1-or-later 0006 */ 0007 0008 #include "postingcodec.h" 0009 0010 #include <QObject> 0011 #include <QTest> 0012 0013 using namespace Baloo; 0014 0015 class PostingCodecTest : public QObject 0016 { 0017 Q_OBJECT 0018 private Q_SLOTS: 0019 void test() { 0020 QVector<quint64> vec = {1, 2, 9, 12}; 0021 QByteArray arr = PostingCodec::encode(vec); 0022 QVERIFY(!arr.isEmpty()); 0023 0024 QVector<quint64> vec2 = PostingCodec::decode(arr); 0025 QCOMPARE(vec2, vec); 0026 } 0027 }; 0028 0029 QTEST_MAIN(PostingCodecTest) 0030 0031 #include "postingcodectest.moc"