mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-08-27 02:39:58 +00:00
refactor: fix some minor clang-tidy warnings
This commit is contained in:
@ -32,10 +32,7 @@ void TestBatterySource::initTestCase()
|
||||
}
|
||||
|
||||
|
||||
void TestBatterySource::cleanupTestCase()
|
||||
{
|
||||
delete source;
|
||||
}
|
||||
void TestBatterySource::cleanupTestCase() {}
|
||||
|
||||
|
||||
void TestBatterySource::test_sources()
|
||||
@ -53,11 +50,11 @@ void TestBatterySource::test_battery()
|
||||
std::for_each(batteries.cbegin(), batteries.cend(), [this](auto bat) {
|
||||
auto value = source->data(bat);
|
||||
if (bat == "ac")
|
||||
QCOMPARE(value.type(), QVariant::Bool);
|
||||
QCOMPARE(value.typeId(), QMetaType::Bool);
|
||||
else if (bat.startsWith("batrate") || bat.startsWith("batleft"))
|
||||
;
|
||||
else
|
||||
QVERIFY((value.toFloat() >= battery.first) || (std::isnan(value.toFloat())));
|
||||
QVERIFY((value.toDouble() >= battery.first) || (std::isnan(value.toDouble())));
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user