Skip to content

Commit

Permalink
Only expect failure on macOS 14+
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Jan 9, 2025
1 parent b20d4e6 commit 1613170
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/unit/cli/testinfocommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include <qtpokit/pokitdevice.h>

#include <QOperatingSystemVersion>

Q_DECLARE_METATYPE(AbstractCommand::OutputFormat)

class MockDeviceCommand : public DeviceCommand
Expand Down Expand Up @@ -102,18 +104,18 @@ void TestInfoCommand::serviceDetailsDiscovered()
command.service = command.device->deviceInformation();
command.format = format;
command.serviceDetailsDiscovered();

#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
if (!info.deviceUuid().isNull()) {
// Fixed (though not called out) by https://bugreports.qt.io/browse/QTBUG-75348
QEXPECT_FAIL("", "QLowEnergyController fails to track device UUIDs prior to Qt 5.14.", Continue);
}
#if defined(Q_OS_MACOS)
else if (!info.address().isNull()) {
QEXPECT_FAIL("", "On macOS, QLowEnergyController fails to track device addresses prior to Qt 5.14.", Continue);
else if ((!info.address().isNull()) && (QOperatingSystemVersion::current().majorVersion() >= 14)) {
QEXPECT_FAIL("", "On macOS 14+, QLowEnergyController fails to track device addresses prior to Qt 5.14.", Continue);
}
#endif // macOS
#endif // < Qt 5.14

QCOMPARE(QByteArray::fromStdString(capture.data()), expected);
}

Expand Down

0 comments on commit 1613170

Please sign in to comment.