File indexing completed on 2024-04-21 03:53:39

0001 /*
0002     This file is part of the KDE Frameworks
0003 
0004     SPDX-FileCopyrightText: 2022 Mirco Miranda
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #include "kmemoryinfotest.h"
0010 
0011 #include <QTest>
0012 
0013 #include "kmemoryinfo.h"
0014 
0015 QTEST_GUILESS_MAIN(KMemoryInfoTest)
0016 
0017 KMemoryInfoTest::KMemoryInfoTest(QObject *parent)
0018     : QObject(parent)
0019 {
0020 }
0021 
0022 void KMemoryInfoTest::isNull()
0023 {
0024     KMemoryInfo m;
0025     QVERIFY(!m.isNull());
0026 }
0027 
0028 void KMemoryInfoTest::operators()
0029 {
0030     KMemoryInfo m;
0031     auto m1 = m;
0032     QVERIFY(m == m1);
0033 
0034     // paranoia check
0035     QVERIFY(m.totalPhysical() != 0);
0036     QCOMPARE(m.totalPhysical(), m1.totalPhysical());
0037 }
0038 
0039 #include "moc_kmemoryinfotest.cpp"