summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp')
-rw-r--r--tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
index 5ecd1723c0..ba5e9eaaa1 100644
--- a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
+++ b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
@@ -181,6 +181,7 @@ void tst_QIpAddress::invalidParseIp4_data()
QTest::newRow("..") << "..";
QTest::newRow("...") << "...";
QTest::newRow("....") << "....";
+ QTest::newRow(".1.2.3") << ".1.2.3";
QTest::newRow("1.") << "1.";
QTest::newRow("1.2.") << "1.2.";
QTest::newRow("1.2.3.") << "1.2.3.";
@@ -209,9 +210,15 @@ void tst_QIpAddress::invalidParseIp4_data()
QTest::newRow("-1.1") << "-1.1";
QTest::newRow("1.-1") << "1.-1";
QTest::newRow("1.1.1.-1") << "1.1.1.-1";
+ QTest::newRow("300-05") << "300-05";
+ QTest::newRow("127.-1") << "127.-1";
+ QTest::newRow("-127-10") << "-127-10";
+ QTest::newRow("198.-16") << "198-16";
+ QTest::newRow("-127.-0.") << "-127.-0.";
// letters
QTest::newRow("abc") << "abc";
+ QTest::newRow("localhost") << "localhost";
QTest::newRow("1.2.3a.4") << "1.2.3a.4";
QTest::newRow("a.2.3.4") << "a.2.3.4";
QTest::newRow("1.2.3.4a") << "1.2.3.4a";
@@ -244,6 +251,7 @@ void tst_QIpAddress::ip4ToString_data()
QTest::newRow("0.0.0.0") << 0u << "0.0.0.0";
QTest::newRow("1.2.3.4") << 0x01020304u << "1.2.3.4";
+ QTest::newRow("127.0.0.1") << 0x7f000001u << "127.0.0.1";
QTest::newRow("111.222.33.44") << 0x6fde212cu << "111.222.33.44";
QTest::newRow("255.255.255.255") << 0xffffffffu << "255.255.255.255";
}