kmemoryinfotest.cpp 661 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. This file is part of the KDE Frameworks
  3. SPDX-FileCopyrightText: 2022 Mirco Miranda
  4. SPDX-License-Identifier: LGPL-2.0-or-later
  5. */
  6. #include "kmemoryinfotest.h"
  7. #include <QTest>
  8. #include "kmemoryinfo.h"
  9. QTEST_GUILESS_MAIN(KMemoryInfoTest)
  10. KMemoryInfoTest::KMemoryInfoTest(QObject *parent)
  11. : QObject(parent)
  12. {
  13. }
  14. void KMemoryInfoTest::isNull()
  15. {
  16. KMemoryInfo m;
  17. QVERIFY(!m.isNull());
  18. }
  19. void KMemoryInfoTest::operators()
  20. {
  21. KMemoryInfo m;
  22. auto m1 = m;
  23. QVERIFY(m == m1);
  24. // paranoia check
  25. QVERIFY(m.totalPhysical() != 0);
  26. QCOMPARE(m.totalPhysical(), m1.totalPhysical());
  27. }
  28. #include "moc_kmemoryinfotest.cpp"