mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Tests: allow compilation with older Qt versions
Comparisons of QString results with C strings didn't always exist. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8777945d00
commit
34e68d34dd
1 changed files with 3 additions and 3 deletions
|
@ -27,16 +27,16 @@ void TestHelper::parseNameAddress()
|
||||||
{
|
{
|
||||||
QString name, address;
|
QString name, address;
|
||||||
address = extractBluetoothNameAddress("01:a2:b3:c4:d5:06", name);
|
address = extractBluetoothNameAddress("01:a2:b3:c4:d5:06", name);
|
||||||
QCOMPARE(address, "01:a2:b3:c4:d5:06");
|
QCOMPARE(address, QString("01:a2:b3:c4:d5:06"));
|
||||||
QCOMPARE(name, QString());
|
QCOMPARE(name, QString());
|
||||||
address = extractBluetoothNameAddress("somename (01:a2:b3:c4:d5:06)", name);
|
address = extractBluetoothNameAddress("somename (01:a2:b3:c4:d5:06)", name);
|
||||||
QCOMPARE(address, "01:a2:b3:c4:d5:06");
|
QCOMPARE(address, QString("01:a2:b3:c4:d5:06"));
|
||||||
QCOMPARE(name, QString("somename"));
|
QCOMPARE(name, QString("somename"));
|
||||||
address = extractBluetoothNameAddress("garbage", name);
|
address = extractBluetoothNameAddress("garbage", name);
|
||||||
QCOMPARE(address, QString());
|
QCOMPARE(address, QString());
|
||||||
QCOMPARE(name, QString());
|
QCOMPARE(name, QString());
|
||||||
address = extractBluetoothNameAddress("somename (LE:{6e50ff5d-cdd3-4c43-a80a-1ed4c7d2d2a5})", name);
|
address = extractBluetoothNameAddress("somename (LE:{6e50ff5d-cdd3-4c43-a80a-1ed4c7d2d2a5})", name);
|
||||||
QCOMPARE(address, "LE:{6e50ff5d-cdd3-4c43-a80a-1ed4c7d2d2a5}");
|
QCOMPARE(address, QString("LE:{6e50ff5d-cdd3-4c43-a80a-1ed4c7d2d2a5}"));
|
||||||
QCOMPARE(name, QString("somename"));
|
QCOMPARE(name, QString("somename"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue