File indexing completed on 2024-12-01 04:35:24
0001 /* 0002 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "loadrecenthistorymanagertest.h" 0008 #include "loadrecenthistorymanager.h" 0009 #include <QTest> 0010 QTEST_GUILESS_MAIN(LoadRecentHistoryManagerTest) 0011 0012 LoadRecentHistoryManagerTest::LoadRecentHistoryManagerTest(QObject *parent) 0013 : QObject(parent) 0014 { 0015 } 0016 0017 void LoadRecentHistoryManagerTest::shouldIncreaseTimer() 0018 { 0019 LoadRecentHistoryManager manager; 0020 const qint64 lastLoadingTimeStamp = manager.lastLoadingTimeStamp(); 0021 const qint64 newTimeStamp = manager.generateNewStartTimeStamp(lastLoadingTimeStamp); 0022 QCOMPARE(newTimeStamp, lastLoadingTimeStamp - (86400 * 3 * 1000)); 0023 } 0024 0025 #include "moc_loadrecenthistorymanagertest.cpp"