File indexing completed on 2024-04-28 03:51:39

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 "documentdb.h"
0009 #include "singledbtest.h"
0010 
0011 using namespace Baloo;
0012 
0013 class DocumentDBTest : public SingleDBTest
0014 {
0015     Q_OBJECT
0016 private Q_SLOTS:
0017     void test();
0018 };
0019 
0020 void DocumentDBTest::test()
0021 {
0022     DocumentDB db(DocumentDB::create("db", m_txn), m_txn);
0023 
0024     QVector<QByteArray> list = {"a", "aab", "abc"};
0025     db.put(1, list);
0026 
0027     QCOMPARE(db.get(1), list);
0028 }
0029 
0030 QTEST_MAIN(DocumentDBTest)
0031 
0032 #include "documentdbtest.moc"