diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-08-06 07:36:33 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-09-01 12:24:48 (GMT) |
commit | a6cb69085975352f10dcf8e6c93c6470ac9c459e (patch) | |
tree | 7a7f37f197bf769b63ff09869b40853f9c98b8de /tests/auto/qudpsocket | |
parent | a06052ce8212f3ab35e9b89573b92322a3978bc6 (diff) | |
download | Qt-a6cb69085975352f10dcf8e6c93c6470ac9c459e.zip Qt-a6cb69085975352f10dcf8e6c93c6470ac9c459e.tar.gz Qt-a6cb69085975352f10dcf8e6c93c6470ac9c459e.tar.bz2 |
test that joining invalid group fails, make test data names more verbose
when testing the ttl and loopback socket options, include the bind
address as part of the test data name
Diffstat (limited to 'tests/auto/qudpsocket')
-rw-r--r-- | tests/auto/qudpsocket/tst_qudpsocket.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp index 7938afa..32fab6b 100644 --- a/tests/auto/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp @@ -869,12 +869,12 @@ void tst_QUdpSocket::multicastTtlOption_data() addresses += QHostAddress(QHostAddress::AnyIPv6); foreach (const QHostAddress &address, addresses) { - QTest::newRow("0") << address << 0 << 0; - QTest::newRow("1") << address << 1 << 1; - QTest::newRow("2") << address << 2 << 2; - QTest::newRow("128") << address << 128 << 128; - QTest::newRow("255") << address << 255 << 255; - QTest::newRow("1024") << address << 1024 << 1; + QTest::newRow(QString("%1 0").arg(address.toString()).toAscii()) << address << 0 << 0; + QTest::newRow(QString("%1 1").arg(address.toString()).toAscii()) << address << 1 << 1; + QTest::newRow(QString("%1 2").arg(address.toString()).toAscii()) << address << 2 << 2; + QTest::newRow(QString("%1 128").arg(address.toString()).toAscii()) << address << 128 << 128; + QTest::newRow(QString("%1 255").arg(address.toString()).toAscii()) << address << 255 << 255; + QTest::newRow(QString("%1 1024").arg(address.toString()).toAscii()) << address << 1024 << 1; } } @@ -907,13 +907,13 @@ void tst_QUdpSocket::multicastLoopbackOption_data() addresses += QHostAddress(QHostAddress::AnyIPv6); foreach (const QHostAddress &address, addresses) { - QTest::newRow("0") << address << 0 << 0; - QTest::newRow("1") << address << 1 << 1; - QTest::newRow("2") << address << 2 << 1; - QTest::newRow("0 again") << address << 0 << 0; - QTest::newRow("2 again") << address << 2 << 1; - QTest::newRow("0 last time") << address << 0 << 0; - QTest::newRow("1 again") << address << 1 << 1; + QTest::newRow(QString("%1 0").arg(address.toString()).toAscii()) << address << 0 << 0; + QTest::newRow(QString("%1 1").arg(address.toString()).toAscii()) << address << 1 << 1; + QTest::newRow(QString("%1 2").arg(address.toString()).toAscii()) << address << 2 << 1; + QTest::newRow(QString("%1 0 again").arg(address.toString()).toAscii()) << address << 0 << 0; + QTest::newRow(QString("%1 2 again").arg(address.toString()).toAscii()) << address << 2 << 1; + QTest::newRow(QString("%1 0 last time").arg(address.toString()).toAscii()) << address << 0 << 0; + QTest::newRow(QString("%1 1 again").arg(address.toString()).toAscii()) << address << 1 << 1; } } @@ -1031,8 +1031,10 @@ void tst_QUdpSocket::multicast_data() QTest::addColumn<QHostAddress>("groupAddress"); QTest::addColumn<bool>("joinResult"); QTest::newRow("valid bind, group ipv4 address") << anyAddress << true << groupAddress << true; + QTest::newRow("valid bind, invalid group ipv4 address") << anyAddress << true << anyAddress << false; QTest::newRow("same bind, group ipv4 address") << groupAddress << true << groupAddress << true; QTest::newRow("valid bind, group ipv6 address") << any6Address << true << group6Address << true; + QTest::newRow("valid bind, invalid group ipv6 address") << any6Address << true << any6Address << false; QTest::newRow("same bind, group ipv6 address") << group6Address << true << group6Address << true; } |